NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Better code hint when creating an instance of an object.
Veteran

Joined: 30 Nov 2006
Posts: 186
Reply with quote
If I have a class like this :

class someClass()
{
function __constructor(string $name)
{
}

}

And I declare an instance of someClass by typing

$myClass = new someClass

The code completion system pops up with the constructor as the first method but it pops up like this someClass::__constructor(string $name), followed by the other public methods.

If I select the constructor method then the code is changed to this.

$myClass = someClass::__constructor()

What I would like is PHPed to be clever enough and realize that I am creating an instance of the class and then only display the __constructor method, and only display the parameters as a hint, so I do not have to go back and change the code to

$myClass = new someClass(

then the parameter hint is displayed correctly.
View user's profileFind all posts by hgrSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
no. Code completion will not do this after NEW keyword. In other words, with code below it will show only class names:
$myClass = new som|
(where | denotes cursor location)

probably you forgot new keyword

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Better code hint when creating an instance of an object.
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