Community
Participate
Working Groups
File x.php: <?php class Singleton { protected static $_instance; private function __construct() # we don't permit an explicit call of the constructor! (like $v = new Singleton()) { } private function __clone() # we don't permit cloning the singleton (like $x = clone $v) { } public static function getInstance() { if (self::$_instance === NULL) { self::$_instance = new self (); } return self::$_instance; } function sayHello() { echo 'Hello'; } } File y.php: <?php include_once 'x.php'; $instance = Singleton::getInstance(); $instance->| // <-- No CA here
If you put all in the same file instead of two files, CA works OK on the given place (shows getInstance() and sayHello() )
Hi Silviya I think there must be some other differences between your project/file setting and mine.Now I could get the CA even I use both x.php and y.php:)
By the way,I could get CA even there is no include statement "include_once 'x.php';"
not reproducable in rc1
verified at PDT-2.2.0.v20100521 Now CA is working like expect for instances from included files Closing this issue... Verified by Teodor Kirkov teodor.k@zend.com