code/template/helper/abstract.php
public function setTemplate($template)
    {
        if(!$template instanceof TemplateInterface)
        {
            if(empty($template) || (is_string($template) && strpos($template, '.') === false) )
            {
                $identifier         = $this->getIdentifier()->toArray();
                $identifier['path'] = array('template');
                $identifier['name'] = $template;

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($template);

            $template = $identifier;
        }

        $this->__template = $template;

        return $this->__template;
    }
public function setTemplate($template)
    {
        if(!$template instanceof TemplateInterface)
        {
            if(empty($template) || (is_string($template) && strpos($template, '.') === false) )
            {
                $identifier         = $this->getIdentifier()->toArray();
                $identifier['path'] = array('template');
                $identifier['name'] = $template;

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($template);

            $template = $identifier;
        }

        $this->__template = $template;

        return $this->__template;
    }
public function setTemplate ( $ template ) { if ( ! $ template instanceof TemplateInterface ) { if ( empty ( $ template ) || ( is_string ( $ template ) && strpos ( $ template , '.' ) === false ) ) { $ identifier = $ this -> getIdentifier ( ) -> toArray ( ) ; $ identifier [ 'path' ] = array ( 'template' ) ; $ identifier [ 'name' ] = $ template ; $ identifier = $ this -> getIdentifier ( $ identifier ) ; } else $ identifier = $ this -> getIdentifier ( $ template ) ; $ template = $ identifier ; } $ this -> __template = $ template ; return $ this -> __template ; }
Sets the template object

@param TemplateInterface $template
@return $this
Sets the template object