Esempio n. 1
0
 public static function getInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 2
0
 public static function get() : System
 {
     if (self::$instance == null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 3
0
 protected function showView()
 {
     if (is_null($this->view)) {
         $S = System::instance();
         $this->view = lcfirst($S->getController()) . DIRECTORY_SEPARATOR . $S->getAction();
     }
     $this->show($this->view, $this->data);
 }
Esempio n. 4
0
    public static function getInstance()
    {
        if (is_null(self::$instance)) {
            self::$instance = new System();
        }

        return self::$instance;
    }
Esempio n. 5
0
 public static function singleton()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }