Return Singleton instance.
184210
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new TwitterMetaProperties();

			self::$instance->init( 'twitter-meta' );
		}

		return self::$instance;
	}
608585
public static function getInstance($name = 'default')
    {
        if (isset(static::$instances[$name])) {
            return static::$instances[$name];
        }

        $instance = new static();

        static::$instances[$name] = $instance;

        return $instance;
    }
230304
function make_singleton( Constructor, singleton_config ) {
		process_after( Constructor );

		var instance = Constructor.create.apply( null, singleton_config === true ? [] : [].concat( singleton_config ) );

		util.def( Constructor, __singleton__, util.describe( { value : instance }, 'r' ) );

		return instance;
	}
378259
public static function getInstance()
    {
        if (is_null(self::$instance)) {
            throw new \RuntimeException('You must first create the singleton instance with createInstance().');
        }
        self::$instance->setGlobalsFromSugar();
        self::$instance->chdirToSugarDir();

        return self::$instance;
    }
585541
def factory():
        """"""
        if not TransCache.SINGLETON or TransCache._cache_is_expired():
            TransCache.SINGLETON = TransCache()
            TransCache.SINGLETON_CREATION_DATETIME = timezone.now()

        return TransCache.SINGLETON
979136
public static function instance() {
        global $CFG;
        if (is_null(self::$singletoninstance)) {
            if (!empty($CFG->perfdebug) and $CFG->perfdebug > 7) {
                self::$singletoninstance = new performance_measuring_filter_manager();
            } else {
                self::$singletoninstance = new self();
            }
        }
        return self::$singletoninstance;
    }
793180
protected static function getInstance()
    {
        $class = get_called_class();

        if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) {
            self::$instance[$class] = new static();
        }

        return static::$instance[$class];
    }
890159
public static PojoUtil getInstance() {

    if (instance == null) {
      PojoUtilImpl impl = null;
      synchronized (PojoUtilImpl.class) {
        if (instance == null) {
          impl = new PojoUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
1156461
def getInstance(cls, *args):
        '''
        
        '''
        if not cls.__singleton:
            cls.__singleton = Heroku(*args)
        return cls.__singleton
464532
def get_instance(uri):
    """"""
    global _instances
    try:
        instance = _instances[uri]
    except KeyError:
        instance = Page(
            uri,
            client.get_instance()
        )
        _instances[uri] = instance

    return instance
412
public static function getInstance ()
    {
        // If this class is used for multiple singletons, we need to keep
        // track of multiple singleton objects, one for each class name
        static $instances = array();

        // Get class name to use. Use late static binding here,
        // if method is overriden by derived classes.
        $singletonClassName = static::_getInstanceClassName();

        // If already instantiated, use that
        if (isset($instances[$singletonClassName])) {
            return $instances[$singletonClassName];
        }

        // Otherwise create new instance
        $instances[$singletonClassName] = new $singletonClassName (static::_getInstanceFuseValue());

        return $instances[$singletonClassName];
    }
882762
public static function singleton() {
        $returnValue = null;

        
        $serviceName = get_called_class();
        if (!isset(self::$instances[$serviceName])) {
            self::$instances[$serviceName] = new $serviceName();
        }

        $returnValue = self::$instances[$serviceName];
        

        return $returnValue;
    }
24446
def instance():
        
        if not hasattr(IOLoop, "_instance"):
            with IOLoop._instance_lock:
                if not hasattr(IOLoop, "_instance"):
                    # New instance after double check
                    IOLoop._instance = IOLoop()
        return IOLoop._instance
806257
public static function getInstance()
    {
        if (!isset(self::$_instance)) {
            $c = __CLASS__;
            self::$_instance = new $c;
        }
        return self::$_instance;
    }
1257397
private static function instance()
    {
        $currentClass = get_called_class();
        $instanceName = empty( self::$instance ) ? '' : new \ReflectionClass(self::$instance);
        if( empty( self::$instance ) || ( $instanceName->name != $currentClass ) ) {
            self::$instance = new static();
        }
        return self::$instance;
    }
685578
def create_instance(self, parent):
        """"""
        self.kwargs['instantiate'] = True
        self.kwargs['parent'] = parent
        instance = self.cls(*self.args, **self.kwargs)
        instance._field_seqno = self._field_seqno
        return instance
824645
public static function singleton()
    {
        $returnValue = null;

        
        if (is_null(self::$singleton)) {
        	self::$singleton = new self();
        }
        $returnValue = self::$singleton;
        

        return $returnValue;
    }