[resolved] Features Requests for PhPED |
Site Admin
|
hmm, your code sample is just incorrect in two ways:
1) no () braces are allowed after class myObj 2) you tried to define myObj, but myObj is assigned with instance of obj which is not defined. I assume that it must be myObj, not obj because later you're calling getObjX method defined in myObj. 3) getObjX returns instance of undefined class objX. Isn't you're expecting to see objX's methods there $myObj->getObjX()-> ? If you get it all done correctly, you'll see that Code Completion works pefectly well in PhpED
|
||||||||||||||
_________________ The PHP IDE team |
|
So there were enough mistakes in my example to make me look like a rookie
I think i narrowed the problem below. $objUtilities is an object being passed in (PHP5, naturally a reference). It returns a 'failed to identify type' error
|
||||||||||||||
|
Site Admin
|
sorry, if I made you feeling like a rookie. My bad.
Regarding your 2nd code sample, I can not say what class instance is passed in $objUtilities argument passed to myClass constructor. Therefore, it's unclear what class instance will be stored in objUtilities property. Property itself is not defined at all. I'd recommend you to either use type hints or phpdoc to tell the IDE how it should handle objUtilities. Try this: http://forum.nusphere.com/tip-type-hints-t1563.html |
||||||||||||
_________________ The PHP IDE team |
|
Nope, after re-reading it - it looked like a rookie wrote it, so my bad.
Wonderful, this will do exactly what I want, except it cant find my class instances. Is there a way to show it WHERE the class resides. Does this also work in a interface for all classes implementing it (that would be really cool) |
||||||||||||||||
|
Site Admin
|
it works for interfances and clasess and you do not need to take any special actions, just make sure that all files with classes are in the project or if they are in stand-alone libraries, just add corresponding path to the Code Insight Includes list (see project properties).
|
||||||||||||
_________________ The PHP IDE team |
|
Okay, I must be not doing something wrong at a very basic level, cause it aint reading it. I'll do a walk through of one of our components and where it is getting its variables etc.
The Workspace has 2 projects, the 'CORE' which has the class libraries and the 'SITE' which is the site using the library. ALL classes reside in the CORE project, only index.php and config.php reside on the SITE 1. The index.php page calls a config.php script which initializes the config class and subsequently initiats any classes required for global functionality. 2. The index.php page uses the CORE class which looks for listeners on available variables then matches the variables to the listener and uses the eval() function to initiate the cooresponding 'COMPONENT' class(es). 3. Every COMPONENT __constuct reads three variables, all objects. In step three is where the code hints are lost. They are not readable in the COMPONENT classes for the three obects passed in (before and after following all instructions from this post). The three classes are all at the root level of the CORE project and the classes calling them are in child folders (each with there own component folder). Now, based on what your 2nd to last post says, all of this shouldn't matter because the @param classname $objVariable should help it to the right class, but it can't find it. Any more ideas? |
||||||||||||
|
|
Okay, I think I figured out where the code hints are lost. See the code below.
|
||||||||||||||
|
Site Admin
|
You may want to add path to the classes to let Code Insight know where to find them.
With your case, add path to CORE directory into "Code Insight Includes" list in the project properties for SITE project. |
||||||||||||
_________________ The PHP IDE team |
|
Case Closed. Thanks Dmitri. All of the code hinting is working perfect now. I had to make sure that i followed all of the classes down the tree to make sure that they effected each other (i was going 5 - 6 classes deep each time) - but it works and I'm happy.
Thanks ( hey - has anyone mentioned how cool code collapsing would be? ) |
||||||||||||
|
[resolved] Features Requests for PhPED |
|
||
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