Ejemplo n.º 1
0
 public static function get_instance()
 {
     // check
     if (!isset(self::$instance)) {
         // class name
         $cls = __CLASS__;
         // create instance
         self::$instance = new $cls();
     }
     // return
     return self::$instance;
 }