Example #1
0
 public static function instance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #2
0
 /**
  * 创建唯一router实例
  * @access public
  * @static
  * @return Object routerObject
  * @example $router = router::getInstance()
  */
 public static function getInstance()
 {
     if (!self::$_instance instanceof router) {
         self::$_instance = new self();
         log::accessLog("Create router instance success");
     }
     log::returnLog(self::$_instance);
     return self::$_instance;
 }