public static function getInstance(array $arr) { if (!self::$_instance instanceof Config) { self::$_instance = new Config($arr); } return self::$_instance; }
/** * Singleton pattern * * @return Config */ public static function instance() { if (is_null(self::$_instance)) { self::$_instance = new self(); } return self::$_instance; }
public static function Instance() { if (!self::$_instance instanceof self) { self::$_instance = new self(); } return self::$_instance; }
static function getInstance() { if (self::$_instance == null) { self::$_instance = new Config(); } return self::$_instance; }
/** * getInstance * @return Config */ public static function getInstance() { if (NULL === self::$_instance) { self::$_instance = new self(); } return self::$_instance; }
public static function getInstance() { if (self::$_instance === null) { self::$_instance = new self(); } return self::$_instance; }
public static function init() { if (self::$_instance == null) { self::$_instance = new Config(); } return self::$_instance; }
public static function get() { if (is_null(self::$_instance)) { self::$_instance = new Config(); } return self::$_instance; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
public function unserialize($serialized) { $this->_config = unserialize($serialized); self::$_instance = $this; }