Get a template function.
@param  string $name
@return callable
163187
public function get(string $name): callable
    {
        if (!$this->exists($name)) {
            throw new LogicException('The template function "' . $name . '" was not found.');
        }

        return $this->helpers[$name];
    }
365698
public function get($name)
    {
        if ($this->flowCache->has($name)) {
            $this->flowCache->requireOnce($name);
        }

        return $this->flowCache->getWrapped($name);
    }
511461
public function getNamedTemplate($name)
    {
        if ($importedTemplate = singleton(WorkflowDefinitionImporter::class)->getImportedWorkflows($name)) {
            return $importedTemplate;
        }

        if (!is_array($this->templates)) {
            return;
        }
        foreach ($this->templates as $template) {
            if ($template->getName() == $name) {
                return $template;
            }
        }
    }
893675
private function getTemplate($name)
    {
        $templates = $this->container->getParameter('sonata.formatter.ckeditor.configuration.templates');

        if (isset($templates[$name])) {
            return $templates[$name];
        }

        return null;
    }
41198
public function compile($name): string
    {
        [
            'template' => $template,
            'cache' => $cache,
        ] = $this->getTemplateFile($name);

        if (\filemtime($template) < @\filemtime($cache)) {
            return $cache;
        }

        $root = Tokenizer\Tokenizer::parseFile($template);

        Processor::parseToken($root, $this->processors);

        \file_put_contents($cache, (string) $root);

        return $cache;
    }
1173306
function &get_template_vars($name=null)
	{
		if(!isset($name)) {
			return $this->_tpl_vars;
		} elseif(isset($this->_tpl_vars[$name])) {
			return $this->_tpl_vars[$name];
		} else {
			// var non-existant, return valid reference
			$_tmp = null;
			return $_tmp;
		}
	}
673695
public function resolver($name = null)
    {
        if (null === $this->__templateResolver) {
            $this->setResolver(new TemplatePathStack());
        }

        if (null !== $name) {
        	$viewPath = $this->__templateResolver->resolve($name, $this);
        	//echo $viewPath. "<br>";
            return $this->__templateResolver->resolve($name, $this);
        }

        return $this->__templateResolver;
    }
766778
public function getFunction($name)
    {
        if (!isset($this->functions[$name])) {
            throw new \LogicException('The template function "' . $name . '" was not found.');
        }

        return $this->functions[$name];
    }
263746
public function getCustomPlugin($name)
    {
        if (isset($this->plugins[$name])) {
            return $this->plugins[$name]['callback'];
        }

        return null;
    }
871500
public function make(string $name): Template
    {
        $name = \trim($name, '/\\');
        $file = $this->compile($name);

        return new Template($this, $name, $file);
    }
1271984
public function get(string $name): Method
    {
        if (!$this->has($name)) {
            //Automatically creating constant
            $method = new Method($name);
            $this->add($method);

            return $method;
        }

        return parent::get($name);
    }
546495
protected function get(string $name, callable $callback)
    {
        if (isset($this->cache[$name])) {
            return $this->cache[$name];
        }

        return $this->cache[$name] = call_user_func($callback, $name);
    }
1051048
public function findTemplate($name)
    {
        if ($this->files->exists($name)) {
            return $name;
        }

        $name = $this->normalizeName($name);

        if (isset($this->cache[$name])) {
            return $this->cache[$name];
        }

        try {
            $this->cache[$name] = $this->finder->find($name);
        } catch (InvalidArgumentException $ex) {
            throw new LoaderError($ex->getMessage());
        }

        return $this->cache[$name];
    }
260990
public function getSource($name)
    {
        try {
            return file_get_contents($this->findTemplate($name));
        } catch (\Exception $exception) {
            return $this->decoratedLoader->getSource($name);
        }
    }
1253495
public function getBlendableTemplate($name)
    {
        /** @var \LCI\Blend\Blendable\Template $template */
        $template = new Template($this->modx, $this->blender, $name);
        return $template->setSeedsDir($this->blender->getSeedsDir());
    }
346411
private function getTemplateFile($name)
    {
        return Request::get('system.root').$this->config['path'].(isset($this->config['module']) ? $this->config['module'] : '').'/'.$name.$this->config['suffix'];
    }
43545
protected function getFileName($name)
    {
        $name = (string) $name;

        try {
            $template = $this->parser->parse($name);
            $file     = $this->locator->locate($template);
        } catch (\Exception $e) {
            throw new \InvalidArgumentException(sprintf('Unable to find template "%s".', $name));
        }

        return $file;
    }