Example #1
0
 public static function getInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Example #2
0
 public static function get() : System
 {
     if (self::$instance == null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Example #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);
 }
Example #4
0
    public static function getInstance()
    {
        if (is_null(self::$instance)) {
            self::$instance = new System();
        }

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