instance() public static méthode

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