Set the name of the template and its path

@param string $template_name
@param string $path
180329
public function setName($template_name , $path = null)
    {
        parent::setName($template_name);
        $this->directory = $path;
    }
779550
public function setTemplateName($templateName)
    {
        if (!$this->id) {
            $this->getContentRoute()->setClassType(get_class($this));
            $this->getContentRoute()->setLocale($this->getLocale());
        }
        $this->getContentRoute()->setTemplateName($templateName);

        return $this;
    }
1072042
public static function setPathCompiled($pathCompiled = '/tmp/Eureka/tpl')
    {
        $pathCompiled = rtrim($pathCompiled, '/') . '/';

        if (!file_exists($pathCompiled) || !is_dir($pathCompiled)) {
            if (!mkdir($pathCompiled, 0755, true)) {
                throw new  \Exception('Cannot create directory for templates compiled (path: ' . $pathCompiled . ')');
            }
        }

        static::$pathCompiled = $pathCompiled;
    }
1015907
def template_name(path, base_path)
      return File.basename(path, ".#{Jammit.template_extension}") unless base_path
      path.gsub(/\A#{Regexp.escape(base_path)}\/(.*)\.#{Jammit.template_extension}\Z/, '\1')
    end
438227
def enable_template(name)
      name = name.to_sym

      return false if @enabled_templates.include?(name)

      unless (template_dir = Template.templates[name])
        say "Unknown template #{name}", :red
        exit -1
      end

      new_template = Template::Directory.new(template_dir)

      # mark the template as enabled
      @enabled_templates << name

      # enable any other templates
      new_template.enable.each do |sub_template|
        enable_template(sub_template)
      end

      # append the new template to the end of the list,
      # to override previously loaded templates
      @templates << new_template

      # add the template directory to the source-paths
      self.source_paths << new_template.path
      return true
    end
844507
public function findTemplate($template_name)
    {
        /*
         * Find template location inside search directory path
         */
        if (!$this->app) {
            throw new Exception_InitError('You should use add() to add objects!');
        }
        $f = $this->app->locatePath(
            $this->template_type ?: $this->settings['template_type'],
            $template_name.$this->settings['extension']
        );

        return $this->origin_filename = $f;
    }
625207
protected function templatePath($path, array $path_vars = []) {
    if (strpos($path, '{') !== false) {
      extract($path_vars);
      preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
      if (!empty($matches[1])) {
        foreach ($matches[1] as $var) {
          $path = str_replace('{$' . $var . '}', $$var, $path);
        }
      }
    }

    return $path;
  }
323944
def get_template(self, template_name, **parameters):
        """"""
        template_path = pathlib.Path(self.template_dir).joinpath(template_name)
        return get_template(template_path, **parameters)
50681
private function templatePath($templateName)
    {
        foreach (array_reverse($this->templateFolderList) as $templateFolder) {
            $templatePath = sprintf('%s/%s.php', $templateFolder, $templateName);
            if (file_exists($templatePath)) {
                return $templatePath;
            }
        }

        throw new TplException(sprintf('template "%s" does not exist', $templateName));
    }
1037893
function setTemplate(transformDir, templateName, clientType) {
    clientType = clientType ? (clientType + '.') : '';

    if (templateCache[templateName]) {
        this.template = templateCache[templateName];
    }
    else {
        var fileName = transformDir + '/' + clientType + templateName + '.template';

        if (fs.existsSync(path.normalize(fileName))) {
            var file = fs.readFileSync(path.normalize(fileName));
            this.template = templateCache[templateName] = dot.template(file);
        }
        else {
            throw new Error('No template at ' + fileName);
        }
    }
}
707575
private function setTemplateFieldName(string $templateFieldName): self
    {
        $this->updatePropertyValue(
            TemplateFieldNameFieldInterface::PROP_TEMPLATE_FIELD_NAME,
            $templateFieldName
        );

        return $this;
    }
570943
public function onParseTemplate(Template $template): void
    {
        if (!$this->environment->isEnabled()) {
            return;
        }

        $this->initialize();
        if ($this->isAutoMappingDisabled($template->getName())) {
            return;
        }

        $templateName = $this->getMappedTemplateName($template->getName());
        if ($templateName) {
            $template->setName($templateName);
        }
    }
578801
function(function_name) {

		for (var i = 0, count = this._current_templates.length; i < count; i++) {

			this._current_templates[i][function_name]();

		}

	}
809150
static function setCachedTree( $originalKey, $uri, $res, $templatePath, &$extraParameters, &$root )
    {
        if ( $root === null )
            return;
        $templateCache =& eZTemplateTreeCache::cacheTable();
        $key = eZTemplateTreeCache::internalKey( $originalKey );
        if ( isset( $templateCache[$key] ) )
        {
            eZDebug::writeDebug( "Template cache for key '$key', created from uri '$uri', already exists", __METHOD__ );
        }
        else
        {
            $templateCache[$key] = array();
        }
        $ini = eZINI::instance();
        $debug = $ini->variable( 'TemplateSettings', 'Debug' ) == 'enabled';
        $templateCache[$key]['root'] =& $root;
        $templateCache[$key]['info'] = array( 'original_key' => $originalKey,
                                              'key' => $key,
                                              'uri' => $uri,
                                              'debug' => $debug,
                                              'resource' => $res,
                                              'template_path' => $templatePath,
                                              'resource_parameters' => $extraParameters );
    }
443047
protected function load_template( string $template_file ) {
		global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
		if ( 0 !== validate_file( $template_file ) ) {
			return;
		}
		require $template_file;
	}
595078
def load(self, name, parent_path=None):
        
        if name not in self.templates:
            self.templates[name] = self._create_template(name)
        return self.templates[name]
10794
public function setTemplateMap(array $templateMap)
    {
        $this->templateMap = [];
        foreach ($templateMap as $name => $filename) {
            $this->addTemplate($name, $filename);
        }
    }