-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can it possible to prompt a variable in view? #2
Comments
Yes. If you have the msg index in a data array: <div class="container">
<?php
/**
* $data array holds the $msg value
*
* @see Controller_name::method_name()
* @var Controller_name $msg The message
*/
echo $msg;
?> |
I didn't get how to make it work! Can someone explain more thoroughly, in for dummies style☻ Btw - Thanks for plugin! It seems to work just fine! I use my own Library, so i jsut added new lines to phpstorm.php file with names of my liblires. But i can't understand why do we need 3 different paragraphs in this file. What is the difference between them? I mean -
|
@glorsh66 You don't need. But you can. This will will make PhpStorm easier to develop, as well as helping you know what each variable in your view is receiving.
PhpStorm will index this file and understand that the properties in PHP Doc is a property in these three classes: CI_Controller, CI_Model and MX_Controller. When you create a controller that extends the CI_Controller, for example, through So there is a need to make the IDE not index the native Controller because it does not provide the understanding that properties. In fact, you'll need to load whatever you want with I also created a post on how to make it work on Atom, the logic of the operation is the same. The reason for the three paragraphs was to separate them, but although I have not tested it yet, I believe that if you do something like this will work the same: /**
* @property Foo $foo
*/
class CI_Controller {}
class CI_Model extends CI_Controller {}
class MX_Controller extends CI_Controller {} The main reason for this need may be because CodeIgniter pattern, because the IDEs do not understand it very well. The use of namespaces facilitates the development and understanding of IDES. Something present in the next version of this framework. |
The text was updated successfully, but these errors were encountered: