lib/Twig/lib/Twig/Environment.php
public function load($name)
    {
        if ($name instanceof Twig_TemplateWrapper) {
            return $name;
        }

        if ($name instanceof Twig_Template) {
            return new Twig_TemplateWrapper($this, $name);
        }

        return new Twig_TemplateWrapper($this, $this->loadTemplate($name));
    }
public function load($name)
    {
        if ($name instanceof Twig_TemplateWrapper) {
            return $name;
        }

        if ($name instanceof Twig_Template) {
            return new Twig_TemplateWrapper($this, $name);
        }

        return new Twig_TemplateWrapper($this, $this->loadTemplate($name));
    }
Loads a template.

@param string|Twig_TemplateWrapper|Twig_Template $name The template name

@throws Twig_Error_Loader  When the template cannot be found
@throws Twig_Error_Runtime When a previously generated cache is corrupted
@throws Twig_Error_Syntax  When an error occurred during compilation

@return Twig_TemplateWrapper