示例#1
0
文件: Session.php 项目: jalama/cli
 public static function instance($session = null)
 {
     if (!self::$instance) {
         self::$instance = new self($session);
     }
     return self::$instance;
 }
示例#2
0
 /**
  * Returns self, instantiating self if necessary
  *
  * @return [Session] self::$instance Static version of $this
  */
 public static function instance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }