instance() public static method

public static instance ( )
示例#1
0
 public static function instance()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
示例#2
0
 public function driver()
 {
     return Mapper::instance();
 }