Beispiel #1
0
 public static function getInstance()
 {
     if (NULL === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 public static function singleton($args = NULL)
 {
     $name = __CLASS__;
     if (!self::$instance) {
         self::$instance = new $name($args);
     }
     return self::$instance;
 }