NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Code completion - objecttype unknown


Joined: 01 Dec 2008
Posts: 1
Reply with quote
Hello,

Recently i implemented a "InstanceManager" class.
The method InstanceManager::GetInstance must be called with a defined classname and it returns an object.

Code:
// for instance
$UserLogin = $InstanceManager->GetInstance(T_USERLOGIN); 


Problem is that the code completion / intellisense is not working on the returned objects. This was expected, but i was
wondering if there are any tricks to get this to work again. A trick to let PHPed know which
type of object a variable represents.

Any help would be great. Thanks in advance.
View user's profileFind all posts by ChrisCoppensSend private message


Joined: 18 Sep 2007
Posts: 54
Location: Croatia
Reply with quote
Had similar problem.
Just make a comment like this:
Code:

/**
* My Object
* @var MyClassName
*/
$UserLogin = $InstanceManager->GetInstance(T_USERLOGIN);

Of course this will not dynamically change depending on your Factory method, but can ease life in development.
View user's profileFind all posts by konixnetSend private messageVisit poster's website
Code completion - objecttype unknown
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