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

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

			self::$instance	= new CmsProperties();

			self::$instance->init( CmsGlobal::CONFIG_BLOG );
		}

		return self::$instance;
	}
72720
public function newInstance()
    {
        $class = get_called_class();
        $instance = new $class();
        $instance->setSerializer($this->getSerializer());
        $instance->setItemConverter($this->getItemConverter()->newInstance());
        return $instance;
    }
246642
def _get_instance(self, **kwargs):
        '''
        '''
        return session.query(self.response_class).filter_by(**kwargs).first()
546333
public static function getInstance()
    {
        $self = get_called_class();
        if (!isset(self::$instances[$self])) {
            self::$instances[$self] = new $self;
        }
        return self::$instances[$self];
    }
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;
    }
733420
def _get_instance(self):
        """"""
        resource = self._connect()

        try:
            instance = resource.Instance(self.running_instance_id)
        except Exception:
            raise EC2CloudException(
                'Instance with ID: {instance_id} not found.'.format(
                    instance_id=self.running_instance_id
                )
            )
        return instance
61405
def init(options=None, ini_paths=None, argv=None,
         strict=False, **parser_kwargs):
    
    global SINGLETON
    SINGLETON = Config(
        options=options,
        ini_paths=ini_paths,
        argv=argv,
        **parser_kwargs)
    SINGLETON.parse(argv, strict=strict)
    return SINGLETON
1102665
public static function getInstance( $name )
    {
        if (! isset( self::$instances[$name] ) )
            self::$instances[$name] = new self( $name );

        return self::$instances[$name];
    }
164603
def get_instance(self):
        
        return Instance(self.rest_client.make_request(self.instance), self.rest_client)
651250
def _get_instance(self, **kwargs):
        """"""
        current_app.logger.info("Getting instance")
        current_app.logger.debug("kwargs: {}".format(kwargs))

        current_app.logger.info(
            "Loading instance: {}".format(kwargs['obj_id']))
        rec = self.db_query.get_instance(self.db_collection, kwargs['obj_id'])
        g._resource_instance = rec
        current_app.logger.debug(
            "g._resource_instance: {}".format(g._resource_instance))
        return rec
1051547
def instance(cls, *args, **kwgs):
        """"""
        if not hasattr(cls, "_instance"):
            cls._instance = cls(*args, **kwgs)
        return cls._instance
76880
public static function singleton()
	{
		if(!isset(self::$instance))
		{
			$className = SESSION_CLASS;
			self::$instance = new $className;
		}
		
		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
488862
public static function getInstance()
    {
        if (empty(self::$instances[static::class])) {
            $instance = new static();
            self::$instances[static::class] = $instance;
        } else {
            $instance = self::$instances[static::class];
        }
        return ($instance);
    }
1253660
def instance(cls) -> 'MiddlewareManager':
        

        if cls._instance is None:
            cls._instance = cls()
            cls._instance.init()
        return cls._instance
746684
def singleton(wrapped, _, args, kwargs):
    
    if wrapped not in _INSTANCES:
        _INSTANCES[wrapped] = wrapped(*args, **kwargs)
    return _INSTANCES[wrapped]
201819
public static function singleton()
    {
        $returnValue = null;

        

		if (core_kernel_persistence_smoothsql_Property::$instance == null){
			core_kernel_persistence_smoothsql_Property::$instance = new core_kernel_persistence_smoothsql_Property();
		}
		$returnValue = core_kernel_persistence_smoothsql_Property::$instance;

        

        return $returnValue;
    }