Return an instance of smarty

@return \Smarty
519008
protected function getSmarty()
    {
        $smarty = new \Smarty();
        $currentDirectory = dirname(__FILE__);
        $smarty->template_dir = realpath(
            $currentDirectory . DIRECTORY_SEPARATOR .
            'smarty' . DIRECTORY_SEPARATOR .
            'templates' . DIRECTORY_SEPARATOR
        );
        $smarty->compile_dir = realpath(
            $currentDirectory . '' . DIRECTORY_SEPARATOR .
            'smarty' . DIRECTORY_SEPARATOR .
            'templates_c' . DIRECTORY_SEPARATOR
        );
        $smarty->left_delimiter = '{{';
        $smarty->right_delimiter = '}}';

        return $smarty;
    }
504383
public static function getInstance() {

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

			self::$instance	= new CmsProperties();

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

		return self::$instance;
	}
918665
public static function instance()
    {
        if (empty(static::$_modmgr)) {
            $module = Yii::$app->getModule(static::$modulesManagerModuleUid);
            if (!empty($module) && $module instanceof UniModule) {
                static::$_modmgr = $module->getDataModel(static::$modulesManagerModelAlias);
            } else {
                static::$_modmgr = new static;
            }
        }
        return static::$_modmgr;
    }
311226
public function instance()
    {
        if ($this->crudApi->instance === null) {
            $fq = $this->getModel();
            $instance = new $fq();
            $this->crudApi->setInstance($instance);
        }

        return $this->crudApi->instance;
    }
663322
public static function getInstance()
    {
        if (self::$_instance === null) {
            self::$_instance = oxNew(__CLASS__);
        }

        return self::$_instance;
    }
626880
public static function getInstance()
    {
        if (null === self::$instance) {
            self::$instance = new static();

            $loader = new YamlFileLoader(self::$instance, new FileLocator(__DIR__.'/../Resources/config'));
            $loader->load('config.yml');
            $loader->load('services.yml');

            self::$instance->setParameter('phantomjs.cache_dir', sys_get_temp_dir());
            self::$instance->setParameter('phantomjs.resource_dir', __DIR__.'/../Resources');
        }

        return self::$instance;
    }
607114
public static function getInstance()
    {
        if (self::$instance == false) {
            self::$config = autoload_config();

            ini_set('session.cookie_httponly', self::$config['app']['SESSION_COOKIE_HTTPONLY']);

            self::$instance = self::generateToken();

            @session_name(self::$instance);
            @session_cache_expire(self::$config['app']['SESSION_EXPIRE']);
            @session_start();

            self::set('s_token', self::$instance);
        }

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

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

			self::$instance	= new FileProperties();

			self::$instance->init( self::CONFIG_FILE );
		}

		return self::$instance;
	}
106436
public function with(array $data) : SmartyView
    {
        foreach ($data as $k => $v) {
            $this->smarty->assign($k, $v);
        }

        return $this;
    }
429722
public function getRegisteredObject($name)
    {
        if (!isset($this->smarty->registered_objects[$name])) {
            throw new SmartyException("'$name' is not a registered object");
        }
        if (!is_object($this->smarty->registered_objects[$name][0])) {
            throw new SmartyException("registered '$name' is not an object");
        }

        return $this->smarty->registered_objects[$name][0];
    }
538580
private static function initInstance(): Instance
    {
        $instance = new Instance();
        if ($data = Config::get('registry')) {
            $instance->setFromArray($data);
        }
        return $instance;
    }
1346382
public static function getInstance() {

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

			self::$instance	= new SiteProperties();

			self::$instance->init( CoreGlobal::CONFIG_FRONTEND );
		}

		return self::$instance;
	}
1286238
public function getInstance()
    {
        if (!$this->parserInstance) {
            /**
             * Check if Twig_Autoloader class exists
             * otherwise include it.
             */
        
            if (!class_exists('\Twig_Autoloader')) {
                require_once $this->parserDirectory . '/Autoloader.php';
            }

            \Twig_Autoloader::register();
            $loader = new \Twig_Loader_Filesystem($this->getTemplateDirs());
            $this->parserInstance = new \Twig_Environment(
                $loader,
                $this->parserOptions
            );

            foreach ($this->parserExtensions as $ext) {
                $extension = is_object($ext) ? $ext : new $ext;
                $this->parserInstance->addExtension($extension);
            }
        }

        return $this->parserInstance;
    }
831250
private function getInstance()
    {
        if (is_null($this->instance)) {
            $this->instance = \RegexGuard\Factory::getGuard();
        }
        
        return $this->instance;
    }
1327223
static function GetInstance()
	{
		if (!self::$IS_INITIALIZED) self::Init();

		if (!self::$INSTANCE instanceof self) self::$INSTANCE = new self;

		return self::$INSTANCE;
	}
177052
public static function getInstance()
    {
        if (self::$_instance === null) {
            self::$_instance = new Config();
            if (self::$_instance->_store === null) {
                self::$_instance->_store = self::$_instance->_setStore();
            }
        }

        return self::$_instance;
    }
136407
public static function instance()
    {
        if (self::$_instance === null) {
            $type = ArrayHelper::getValue(Yii::$app->params, 'mdm.admin.configs', []);
            if (is_array($type) && !isset($type['class'])) {
                $type['class'] = static::className();
            }

            return self::$_instance = Yii::createObject($type);
        }

        return self::$_instance;
    }