Custom code-completion rules |
Site Admin
|
In this case you can define RoleModel class property either as a real property: or as a virtual property: |
||||||||||||||
_________________ The PHP IDE team |
Veteran
|
Ah, the first method seems to work just fine.
I'd prefer to not have to define the var but if I must, I will. Thanks for the quicker/easier solution dmitri. |
||||||||||||
|
Site Admin
|
It's property, not var, but still per phpdoc the tag is @var...
As I've suggested, there two ways. The first way explicitly declares the property and it is the most correct way. With the 2nd way, you define only virtual propery. It is more suitable for getter/setter cases when properties can not be explicitly defined. |
||||||||||||||||
_________________ The PHP IDE team |
Veteran
|
I may have been doing it incorrectly, but the 2nd method did not work in my situation.
The first method does, however. |
||||||||||||
|
Site Admin
|
make sure that the phpdoc follow the following scheme: /** <- two asterisks, no less, no more @property CLASSNAME $PROPERTYNAME <- starts with dollar sign */ and make sure the property is listed in the Code Explorer (or Code Navigator), like on the screenshot |
||||||||||||||
_________________ The PHP IDE team |
|
Hey dmitri, is this feature documented anywhere? I recently discovered this @property capability and was wondering if there are any other features to it?
Specifically I'd like to type hint an "array of objects", something like this:
|
||||||||||||||
|
Site Admin
|
I believe "@property array[myRegion] $tblRegions " would be useless. What may make sense is @property someobject $tblRegions[], otherwise it would be completely unclear of what class the object instances are in the array.
|
||||||||||||
_________________ The PHP IDE team |
|
I've the same question regards CodeIgniter & PhpEd!!
now I've Models, Controls & Views each as separate file and there isn't require() or include() , so the code-completion function doesn't work WHICH IS ON OF MOST IMPORTANT features in PhpED !! is there any solution for this ? |
||||||||||||
|
Site Admin
|
Why do you think there is any relation between require() or include() and code completion?
There is nothing in common unless you turned on LIMIT SCOPE TO INCLUDES. By default this option is off and Code Completion looks for the classes through all the files in the project (does not limit the scope to only included files). In short, if the code is correct, Code Completion works fine. |
||||||||||||
_________________ The PHP IDE team |
|
Sorry dmitri, I just tried to guess how it works !! BTW, I'm just starting with CodeIgniter and my code is so simple, only 1 model & 1 controller and it works fine ! here's my categories model code :
and here's my category controller
So, I think simply, when I write $this->Categories-> ( IT SHOULD appear get_sub_categories(), but it doesn't). am I right or am that fool ?! |
||||||||||||||||||
|
Site Admin
|
Please try to understand the code below and tell me what methods are supposed to appear after $this->Wood->
|
||||||||||||||
_________________ The PHP IDE team |
Custom code-completion rules |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by