public function load($name): TemplateWrapper
{ if ($name instanceof TemplateWrapper
) { return $name;
} return new TemplateWrapper($this,
$this->
loadTemplate($this->
getTemplateClass($name),
$name));
} /**
* Loads a template internal representation.
*
* This method is for internal use only and should never be called
* directly.
*
* @param string $name The template name
* @param int $index The index if it is an embedded template
*
* @throws LoaderError When the template cannot be found
* @throws RuntimeError When a previously generated cache is corrupted
* @throws SyntaxError When an error occurred during compilation
*
* @internal
*/