Community
Participate
Working Groups
Build Identifier: 2.2 When Class FooBar is created dynamicly in ParentClass Bar (by the late static binding function get_called_class of PHP5.3) method-completion doesn't show the methods of class FooBar, only the methods of the parent class Bar are proposed Example: *** Classes: abstract class Bar { public static function getInstance() { if(!isset(static::$instance)){ $classname = get_called_class(); static::$instance = new $classname(); } return static::$instance; } public function my_bar_method(){ ; } } abstract class FooBar extends Bar{ public function my_foobar_method(){ ; } } *** Script: $foobar = FooBar::getInstance(); $foobar -> ... // Only the method my_bar_method() is proposed... *** Additional Information: When we add the function getInstance(){ return parent::getInstance(); } to FooBar. The completion works fine. But we don't want to add getInstance-functions to all our FooBarClasses... Reproducible: Always
This functionality can be achieved with: /** * @return $this */ public static function getInstance() Mark as worksforme.
Verified - works with @return $this. Closing