Sets whether or not the engine is running inside a '_template' directory.

@param $inside
187205
public function setInsideTemplateDirectory($inside)
    {
        $this->insideTemplateDirectory = $inside;
        $this->getPathManager()->getGenerator()->setInsideTemplateDirectory($inside);
    }
1143072
public function process(Smarty_Internal_Template $_template)
    {
        $_smarty_tpl = $_template;
        if ($_template->source->handler->recompiled || !$_template->compiled->exists ||
            $_template->smarty->force_compile || ($_template->smarty->compile_check &&
                $_template->source->getTimeStamp() > $_template->compiled->getTimeStamp())
        ) {
            $this->compileTemplateSource($_template);
            $compileCheck = $_template->smarty->compile_check;
            $_template->smarty->compile_check = false;
            if ($_template->source->handler->recompiled) {
                $level = ob_get_level();
                ob_start();
                try {
                    eval("?>" . $this->content);
                }
                catch (Exception $e) {
                    while (ob_get_level() > $level) {
                        ob_end_clean();
                    }
                    throw $e;
                }
                ob_get_clean();
                $this->content = null;
            } else {
                $this->loadCompiledTemplate($_template);
            }
            $_template->smarty->compile_check = $compileCheck;
        } else {
            $_template->mustCompile = true;
            @include($_template->compiled->filepath);
            if ($_template->mustCompile) {
                $this->compileTemplateSource($_template);
                $compileCheck = $_template->smarty->compile_check;
                $_template->smarty->compile_check = false;
                $this->loadCompiledTemplate($_template);
                $_template->smarty->compile_check = $compileCheck;
            }
        }
        $_template->smarty->ext->_subTemplate->registerSubTemplates($_template);

        $this->processed = true;
    }
1272045
public static function start_compile($template)
    {
        $key = self::get_key($template);
        self::$template_data[$key]['start_time'] = microtime(true);
    }
1272235
public function setTemplateDir($dir)
    {
        $tmpDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR;
        if (is_dir($tmpDir) === false) {
            throw new Exception('The template directory: "' . $tmpDir . '" does not exists, create the directory or specify an other location !');
        }
        $this->templateDir[] = $tmpDir;
    }
92576
public function setTemplate(string $template): self
    {
        $projectDir = System::getContainer()->get('huh.utils.container')->getProjectDir();

        $this->template = $projectDir.\DIRECTORY_SEPARATOR.ltrim(preg_replace('#^'.$projectDir.'#', '', $template), \DIRECTORY_SEPARATOR);

        return $this;
    }
804676
function setCachedTemplateTree( $keyData, $uri, $res, $templatePath, &$extraParameters, &$root )
    {
        $key = $this->cacheKey( $keyData, $res, $templatePath, $extraParameters );
        eZTemplateTreeCache::setCachedTree( $key, $uri, $res, $templatePath, $extraParameters, $root );
        eZTemplateTreeCache::storeCache( $key, $templatePath );
    }
685367
public void setTemplatesDirectory( String templatesDirectory ) {

		this.logger.fine( "Templates directory is now... " + templatesDirectory );
		this.templatesDIR = Utils.isEmptyOrWhitespaces( templatesDirectory ) ? null : new File( templatesDirectory );
		synchronized( this.watcherLock ) {
			if( this.templateWatcher != null )
				resetWatcher();
		}
	}
718480
protected function _setTemplatesInternal(array $templates) {

        if (is_array($templates)) {

            foreach ($this->_userChangedTemplates as $key) {

                if (array_key_exists($key, $templates)) {
                    unset($templates[$key]);
                }
            }
        }

        $this->_setTemplatesWrapper($templates);
    }
279556
public function setTemplate($template)
    {
        $updateTemplateStm = $this->connection->prepare("UPDATE Page SET template = :template WHERE page_id = :page_id");
        $updateTemplateStm->bindParam(":template", $this->template);
        $updateTemplateStm->bindParam(":page_id", $this->page_id);
        $this->template = $template;
        $updateTemplateStm->execute();
    }
287070
public function warmUp($cacheDir)
    {
        $mustache = $this->container->get('mustache');

        foreach ($this->finder->findAllTemplates() as $template) {
            if ('mustache' !== $template->get('engine')) {
                continue;
            }

            try {
                $mustache->loadTemplate((string) $template);
            } catch (\Exception $e) {
                // problem during compilation, give up
            }
        }
    }
1037995
protected function templateExists($template)
    {
        $loader = $this->twig->getLoader();
        if (method_exists($loader, 'exists')) {
            return $loader->exists($template);
        }

        try {
            // cast possible TemplateReferenceInterface to string because the
            // EngineInterface supports them but Twig_LoaderInterface does not
            $loader->getSource($template)->getCode();
        } catch (\Twig_Error_Loader $e) {
            return false;
        }

        return true;
    }
548751
public function setTemplate(string $template): self
    {
        $this->template = $template;
        $this->logger->debug("Template file set to loader.", ["template" => $this->template]);
        return $this;
    }
37526
public function initializeTemplate($directory = null)
	{
		if (empty($directory)) {
			$directory = $this->config->resolvePath('views');
		}

		$this->template = new Template($directory);
	}
685741
public static function setTemplateEngine(string $id) {
		Container::getInstance()->setMulti($id, Container::MULTI_CLONE);
		$clazz = Container::getInstance()->get($id);
		if (!is_subclass_of($clazz, __NAMESPACE__ . '\\TemplateInterface')) {
			throw new InvalidClassException("$clazz not implemented TemplateInterface");
		}
		self::$tpl_engine = $id;
	}
1218309
public function setTemplate($template, array $template_variables = [])
	{
		$this->template = $template;
		$this->template_variables = $template_variables;

		return $this;
	}
996735
public function isCached(Smarty_Internal_Template $_template)
    {
        if ($this->valid !== null) {
            return $this->valid;
        }
        while (true) {
            while (true) {
                if ($this->exists === false || $_template->smarty->force_compile || $_template->smarty->force_cache) {
                    $this->valid = false;
                } else {
                    $this->valid = true;
                }
                if ($this->valid && $_template->caching == Smarty::CACHING_LIFETIME_CURRENT &&
                    $_template->cache_lifetime >= 0 && time() > ($this->timestamp + $_template->cache_lifetime)
                ) {
                    // lifetime expired
                    $this->valid = false;
                }
                if ($this->valid && $_template->smarty->compile_check == 1 &&
                    $_template->source->getTimeStamp() > $this->timestamp
                ) {
                    $this->valid = false;
                }
                if ($this->valid || !$_template->smarty->cache_locking) {
                    break;
                }
                if (!$this->handler->locked($_template->smarty, $this)) {
                    $this->handler->acquireLock($_template->smarty, $this);
                    break 2;
                }
                $this->handler->populate($this, $_template);
            }
            if ($this->valid) {
                if (!$_template->smarty->cache_locking || $this->handler->locked($_template->smarty, $this) === null) {
                    // load cache file for the following checks
                    if ($_template->smarty->debugging) {
                        $_template->smarty->_debug->start_cache($_template);
                    }
                    if ($this->handler->process($_template, $this) === false) {
                        $this->valid = false;
                    } else {
                        $this->processed = true;
                    }
                    if ($_template->smarty->debugging) {
                        $_template->smarty->_debug->end_cache($_template);
                    }
                } else {
                    $this->is_locked = true;
                    continue;
                }
            } else {
                return $this->valid;
            }
            if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_SAVED &&
                $_template->cached->cache_lifetime >= 0 &&
                (time() > ($_template->cached->timestamp + $_template->cached->cache_lifetime))
            ) {
                $this->valid = false;
            }
            if ($_template->smarty->cache_locking) {
                if (!$this->valid) {
                    $this->handler->acquireLock($_template->smarty, $this);
                } elseif ($this->is_locked) {
                    $this->handler->releaseLock($_template->smarty, $this);
                }
            }
            return $this->valid;
        }
        return $this->valid;
    }
902871
public function start_template(Smarty_Internal_Template $template, $mode = null)
    {
        if (isset($mode)) {
            $this->index ++;
            $this->offset ++;
            $this->template_data[$this->index] = null;
        }
        $key = $this->get_key($template);
        $this->template_data[$this->index][$key]['start_template_time'] = microtime(true);
    }