If singleton instance not exists then instantiate it.
@return CNabuEngine Returns singleton instance
@throws ENabuSingletonException
552734
public static function getEngine()
    {
        if (self::$nb_engine === null) {
            self::$nb_engine = new CNabuEngine();
            self::$nb_engine->init();
        }

        return self::$nb_engine;
    }
371456
public function createInstance()
    {
        switch ($this->method) {
            case 'addBigIntegerColumn':
            case 'addBinaryColumn':
            case 'addBooleanColumn':
            case 'addDateColumn':
            case 'addDateTimeColumn':
            case 'addDecimalColumn':
            case 'addFloatColumn':
            case 'addIntegerColumn':
            case 'addSmallIntegerColumn':
            case 'addStringColumn':
            case 'addTextColumn':
            case 'addTimeColumn':
                $namespace = 'Rentgen\\Database\\Column\\';
                $class = $namespace . ltrim($this->method, 'add');
                $options = isset($this->params[1]) ? $this->params[1] : array();

                if ('addStringColumn' === $this->method && !isset($options['limit'])) {
                    $options['limit'] = 255;
                }
                $column = new $class($this->params[0], $options);
                break;
            case 'addCustomColumn':
                $options = isset($this->params[2]) ? $this->params[2] : [];
                $column = new CustomColumn($this->params[0], $this->params[1], $options);
                break;
            default:
                throw new \Exception(sprintf("Unsupported method " . $this->method));
        }

        if (isset($options['comment'])) {
            $column->setDescription($options['comment']);
        }

        return $column;
    }
1057418
public static function instance()
    {
        if (null === self::$_instance) {
            $session_factory = new SessionFactory;
            $session = $session_factory->newInstance($_COOKIE);
            $segment = $session->getSegment('Barebone\Session');

            self::$_instance = $segment;
        }
        return self::$_instance;
    }
666271
final public static function getInstance()
    {
        $cls = static::class;
        if (isset(static::$instances[$cls])) {
            return static::$instances[$cls];
        }

        if ($cls === self::class) {
            throw new \LogicException("$cls cannot be used directly. Please subclass in your project.");
        }

        return static::$instances[$cls] = static::create();
    }
875931
public static function getInstance()
    {
        if (!self::$instance instanceof ClientInterface) {

            $serviceContainer = ServiceContainer::getInstance();

            self::$instance = new static(
                $serviceContainer->get('engine'),
                $serviceContainer->get('procedure_loader'),
                $serviceContainer->get('procedure_compiler'),
                $serviceContainer->get('message_factory')
            );
        }

        return self::$instance;
    }
824645
public static function singleton()
    {
        $returnValue = null;

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

        return $returnValue;
    }
306601
public function getInstance()
    {
        if ($this->isSingleton() && $this->hasInstance()) {
            return $this->instance;
        }

        // require path
        if ($this->path) {
            require_once $this->path;
        }

        // initialize
        if ($this->isClosure()) {
            $closure = $this->class;
            $instance = $closure($this->container);
        } else {
            $class = $this->class;
            if ($class[0] !== '\\') $class = '\\' . $class;
            $script = sprintf('$instance = new %s(%s);', $class, $this->array2ArgsWithInjectDependency('$this->args', $this->args));
            eval($script);
        }

        if ($this->isSingleton()) {
            $this->instance = $instance;
        }
        if ($this->container && method_exists($instance, 'setContainer')) {
            $instance->setContainer($this->container);
        }
        
        // inject dependency
        if ($this->container) {
            $this->container->injectDependency($instance);
        }
        
        // init method
        if ($this->hasInitMethod()) {
            $this->callInitMethod($instance);
        } elseif($this->hasInitializeMethod($instance)) {
            $instance->initialize();
        }

        return $instance;
    }
1161919
public static function GetInstance() {
      if (!isset(self::$_Instance)) {
         $c = __CLASS__;
         self::$_Instance = new $c();
      }
      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;
    }
258486
public static function getInstance()
    {
        if (!isset(self::$_instanceOfSelf)) {
            $c = __CLASS__;
            self::$_instanceOfSelf = new $c;
        }
        return self::$_instanceOfSelf;
    }
872969
public function newInstance()
    {
        if ($this->prototype === null) {
            $this->prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
        }

        return clone $this->prototype;
    }
1240630
final public static function instance() {
        $c = get_called_class();
       
        if( ! isset( self::$instances[$c] ) )
        {
            self::$instances[$c] = new $c;
        }
       
        return self::$instances[$c];
    }
712206
public function setNew(string $new = "T") : CNabuDataObject
    {
        if ($new === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$new")
            );
        }
        $this->setValue('nb_user_group_member_new', $new);
        
        return $this;
    }
852730
public static function getInstance()
    {
        $sClass = get_called_class();

        if (!isset(self::$_aInstances[$sClass])) {
            self::$_aInstances[$sClass] = new $sClass();
        }

        return self::$_aInstances[$sClass];
    }
530997
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(
                StubFactory::instance(),
                StubVerifierFactory::instance(),
                EmptyValueFactory::instance(),
                AssertionRenderer::instance(),
                ExceptionAssertionRecorder::instance(),
                Invoker::instance()
            );
        }

        return self::$instance;
    }
1024867
public static function getInstance() {

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

			self::$instance	= new GoogleProperties();

			self::$instance->init( SnsConnectGlobal::CONFIG_SNS_GOOGLE );
		}

		return self::$instance;
	}
45094
public static function getInstance()
    {
        static $_instance;

        if (!$_instance) {
            $_instance = new self(new AnConfig(array('service_container' => AnService::getInstance())));
            AnService::set('plg:contentfilter.chain', $_instance);
            AnService::get('com:plugins.helper')->import('contentfilter');
        }

        return $_instance;
    }