code/libraries/joomlatools/library/view/template.php
public function setTemplate($template)
    {
        if (!($template instanceof KTemplateInterface))
        {
            if (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;
    }
public function setTemplate($template)
    {
        if (!($template instanceof KTemplateInterface))
        {
            if (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;
    }
public function setTemplate ( $ template ) { if ( ! ( $ template instanceof KTemplateInterface ) ) { if ( 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 ; }
Method to set a template object attached to the view

@param   mixed   $template An object that implements KObjectInterface, an object that implements
KObjectIdentifierInterface or valid identifier string
@throws  UnexpectedValueException    If the identifier is not a table identifier
@return  KViewAbstract
Method to set a template object attached to the view