Symfony\Component\Templating\PhpEngine::load PHP Method

load() protected method

Loads the given template.
protected load ( mixed $name ) : Symfony\Component\Templating\Storage\Storage
$name mixed A template name or a TemplateReferenceInterface instance
return Symfony\Component\Templating\Storage\Storage A Storage instance
    protected function load($name)
    {
        $template = $this->parser->parse($name);

        $key = $template->getLogicalName();
        if (isset($this->cache[$key])) {
            return $this->cache[$key];
        }

        $storage = $this->loader->load($template);

        if (false === $storage) {
            throw new \InvalidArgumentException(sprintf('The template "%s" does not exist.', $template));
        }

        return $this->cache[$key] = $storage;
    }