Ejemplo n.º 1
0
 public static function getInstance(array $arr)
 {
     if (!self::$_instance instanceof Config) {
         self::$_instance = new Config($arr);
     }
     return self::$_instance;
 }
Ejemplo n.º 2
0
 /**
  * Singleton pattern
  *
  * @return  Config
  */
 public static function instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 3
0
 public static function Instance()
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 4
0
 static function getInstance()
 {
     if (self::$_instance == null) {
         self::$_instance = new Config();
     }
     return self::$_instance;
 }
Ejemplo n.º 5
0
 /**
  * getInstance
  * @return Config
  */
 public static function getInstance()
 {
     if (NULL === self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 6
0
 public static function getInstance()
 {
     if (self::$_instance === null) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 7
0
 public static function init()
 {
     if (self::$_instance == null) {
         self::$_instance = new Config();
     }
     return self::$_instance;
 }
Ejemplo n.º 8
0
 public static function get()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new Config();
     }
     return self::$_instance;
 }
Ejemplo n.º 9
0
 /**
  * Get the singleton instance of Config.
  *
  *     $config = Config::instance();
  *
  * @return  Config
  */
 public static function instance()
 {
     if (Config::$_instance === NULL) {
         // Create a new instance
         Config::$_instance = new Config();
     }
     return Config::$_instance;
 }
Ejemplo n.º 10
0
 /**
  * Gets the singleton instance.
  * @return Config
  */
 public static function &instance()
 {
     if (self::$_instance === null) {
         // Create a new instance
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 11
0
 /**
  * Get the singleton instance of Config.
  *
  * @return  Config
  */
 public static function instance(Config_Reader $reader, $first = TRUE)
 {
     if (self::$_instance === NULL) {
         // Create a new instance
         self::$_instance = new self();
     }
     self::$_instance->attach($reader, $first);
     return self::$_instance;
 }
Ejemplo n.º 12
0
 /**
  * Setup the instance (singleton)
  *
  * @param $glob array Current globals
  *
  * @return Config
  */
 public static function getInstance($glob = array())
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self($glob);
     }
     return self::$_instance;
 }
Ejemplo n.º 13
0
 public function unserialize($serialized)
 {
     $this->_config = unserialize($serialized);
     self::$_instance = $this;
 }