NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Code Hinting


Joined: 22 Dec 2006
Posts: 42
Reply with quote
The Code Hinting in PHPED is fantastic, but there is one area where it doesn't work (in fact, NO code hinter that I am aware of does) that would be really awesome.

We have a very complex application core written in PHP where our classes are dynamically instantiated and PhpED does not pick up on the instance.

CLASS SERVILLIAN
Code:
...
$this->$strVariableName = eval("return new $strClassName( \$this->objUtilities, \$this, \$this->objSecurity );");
...


CLASS $strClassName
Code:
/** constructor
* @param utilities $objUtilities
* @param servillian $objServillian
* @param security $objSecurity
*/
public function __construct( $objUtilities, $objServillian, $objSecurity ){

 $objServillian->NO CODE HINTS

}


When you open the instance of $strVariableName, it doesn't know how to make the link to the three objects in the new $strClassName.


Last edited by bholbrook on Fri Mar 23, 2007 2:33 pm; edited 1 time in total
View user's profileFind all posts by bholbrookSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
what does it say if you press Ctrl-Space in the place where you're expecting the "hints"? (BTW we call it code completion dropdown)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Dec 2006
Posts: 42
Reply with quote
Code completion is not available due to the following error(s):
Failed to find class of "objServillian" member, (declared as "servillian")
View user's profileFind all posts by bholbrookSend private message


Joined: 08 Feb 2007
Posts: 67
Reply with quote
Not sure if this would be the problem, but is the "servillian" object in the same PhpED Workspace as this file?
View user's profileFind all posts by nothsaSend private message


Joined: 22 Dec 2006
Posts: 42
Reply with quote
Yes the CLASS servillian is in the same workspace and the OBJECT $objServillian is declared in the same workspace.
View user's profileFind all posts by bholbrookSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
if Code Explorer does not list servillian class, please check if this class is declared somewhere and this "somewhere" is php file and it's either in the project or in a directory listed in Code Insight Includes property of the project and this project is active (bolded).

if Code Explorer does list this class, please check if current file has require_once for the file containing the class or "Limit scope to included" is not checked in Tools->Settings->Code Insight.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Dec 2006
Posts: 42
Reply with quote
1. Yes the Servillian Class is declared in a php file.
2. Same Project AND Active
3. YES in Code Insight
4. require_once IS used
5. Limit Scope to Included is NOT checked

It seems (after looking at the code) that the eval has nothing to do with it at this point. my class x is having class Servillian passed in and at that point won't use code completion. This was working until I put the eval code in, which the servillian class uses.
View user's profileFind all posts by bholbrookSend private message
Code Hinting
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic