public static final function getInstance() { if (!static::$_instance) { static::$_instance = new self(); } return static::$_instance; }
public static function _i() { if (static::$_instance === NULL) { static::$_instance = new static(); } return static::$_instance; }
/** * Returns an instance of the singleton. * * Passes args to constructor */ public static final function instance() { if (null === static::$_instance) { static::$_instance = new self(func_get_args()); } return self::$_instance; }
/** * Creates a new instance for static use of the class. * * @return Image_Driver */ protected static function instance() { if (static::$_instance == null) { static::$_instance = static::forge(static::$_config); } return static::$_instance; }
public static function instance() { if (static::$_instance == null) { static::$_instance = static::factory(); } return static::$_instance; }
public static function getInstance() { if (static::$_instance === null || !static::$_instance instanceof static) { static::$_instance = new static(); } return static::$_instance; }
/** * Get instance of \Hoa\Registry. * * @return object */ protected static function getInstance() { if (null === static::$_instance) { static::$_instance = new parent(); } return static::$_instance; }
public static function getInstance($config) { if (!static::$_instance instanceof static) { static::$_instance = new static($config); } return static::$_instance; }
/** * Create a new instance of the current cache driver, using the given settings. * * @param array $config * @return void */ public static function getInstance(array $config) { if (static::$_instance === null) { static::$_instance = new static($config); } return static::$_instance; }
/** * 获取Pandaphp单例 * @access public * @author songdengtao <http://www.songdengtao.cn> * @return object */ public static function getInstance() { if (is_null(static::$_instance)) { static::$_instance = new Pandaphp(); } return static::$_instance; }
public static function instance() { if (static::$_instance === NULL) { static::$_instance = new Event(); } return static::$_instance; }
/** * Returns an instance of this class. * * Useful when we need to use some of the trait methods. * * @return \Field\Utility\TextToolbox */ public static function getInstance() { if (!static::$_instance) { static::$_instance = new TextToolBox(); } return static::$_instance; }
public static function instance() { if (empty(static::$_instance)) { static::$_instance = new self(); } return static::$_instance; }
public static function getInstance() { if (empty(static::$_instance)) { static::$_instance = new FUFRoute(); } return static::$_instance; }
public static final function getInstance() { if (static::$_instance === null) { static::$_instance = new static(); } return static::$_instance; }
public static function getInstance($host, $db, $user, $pass) { if (static::$_instance === null) { static::$_instance = new static($host, $db, $user, $pass); } return static::$_instance; }
/** * @return ProfilerLogger */ public static function getInstance() { if (static::$_instance == null) { static::$_instance = new ProfilerLogger(); } return static::$_instance; }
public static function getInstance() { if (static::$_instance === null) { static::$_instance = new Model(); } return static::$_instance; }
/** * Checks, instantiates and returns the only instance of the using class. * * @return object */ public static function getinstance() { if (!static::$_instance instanceof static) { static::$_instance = new static(); } return static::$_instance; }
public static function forge() { if (static::$_instance == null) { static::$_instance = new static(); } return static::$_instance; }
/** * Creates singleton instance if it does not exist otherwise returns * an existing instance without having to instantiate a new object * * @return Singleton Returns a singleton instance * */ public static function getInstance() { if (static::$_instance === null) { static::$_instance = new Database(); } return static::$_instance->databaseHandler; }
public static function getInstance() { if (static::$_instance) { return static::$_instance; } return static::$_instance = new self(); }
/** * Get the singleton instance * * @return Auth */ public static function getInstance() { if (static::$_instance === NULL) { static::$_instance = new Auth(); } return static::$_instance; }
/** * * @return mixed|static */ public static function getInstance() { if (!is_object(static::$_instance)) { static::$_instance = new static(); } return static::$_instance; }
/** * Returns an instance of this class. * * Useful when we need to use some of the trait methods. * * @return \Taxonomy\Utility\TaxonomyToolbox */ public static function getInstance() { if (!static::$_instance) { static::$_instance = new TaxonomyToolbox(); } return static::$_instance; }
/** * Create Client object * * @param string Identifier for this client's instence * @param array Configuration array * @return Fieldset */ public static function client($name = 'default', $config = array()) { if (is_array($name)) { $config = $name; $name = 'default'; } if ($exists = static::instance($name)) { return $exists; } if (!isset($config['driver']) || empty($config['driver'])) { throw new Exception('No Tapioca driver given.'); } $driver = 'Tapioca\\Driver_' . ucfirst($config['driver']); if (!class_exists($driver, true)) { throw new Exception('Could not find Tapioca driver: ' . $config['driver'] . ' (' . $driver . ')'); } // Default config // DO NOT EDIT $_defaults = array('driver' => 'Rest', 'slug' => false, 'url' => true, 'clientId' => false, 'clientSecret' => false, 'fileStorage' => false, 'mongo' => array('dsn' => 'mongodb://*****:*****@localhost:27017/databaseName', 'persist' => true, 'persist_key' => 'tapioca', 'replica_set' => false), 'cache' => array('ttl' => 3600, 'path' => false), 'collections' => array('apps' => 'apps', 'library' => 'library', 'previews' => 'previews')); static::config($config, $_defaults); static::$_instances[$name] = new $driver($config); if ($name == 'default') { static::$_instance = static::$_instances[$name]; } return static::$_instances[$name]; }
/** * Retrieve the active instance. * * @return Authentication */ public static function instance() { if (!static::$_instance) { static::$_instance = new static(); } return static::$_instance; }
public static function getInstance() { if (!isset(self::$_instance)) { static::$_instance = new static(); } return self::$_instance; }
/** * Returns the *Singleton* instance of this class. * * @return HighchartGlobalOptions The *Singleton* instance. */ public static function getInstance() { if (null === static::$_instance) { static::$_instance = new static(); } return static::$_instance; }
/** * Get HTTP instance * * @return \ezote\lib\HTTP */ public static function instance() { if (static::$_instance === false) { static::$_instance = new static(eZHTTPTool::instance(), $_SERVER); } return static::$_instance; }