/** * 获取实例 * */ public static function getInstance() { if (self::$_instance === null) { self::$_instance = new self(); } return self::$_instance; }
/** * create an autoloader instance * * @return Autoloader */ public static function singleton() { if (self::$_instance instanceof self === true) { return self::$_instance; } self::$_instance = new self(); return self::$_instance; }