when I use the "new" operator to instantiate the class, netbeans has no problem with auto-filling the elements of the object.
$instance = new Singleton(); $instance->
but when I use singleton to retrieve an object, it cannot autocomplete the members in the resulting object.
getInstance code is as follows:
public function test() { echo "hello"; } public static function getInstance() { if ( ! is_object(self::$_instance)) { self::$_instance = new self(); self::$_instance->initialize(); } return self::$_instance; }
so i use:
$instance = Singleton::getInstance(); $instance->
Does anyone have the same problem?
how do i get around this?
thanks!
php netbeans
never_had_a_name
source share