public function addTemplatePath($path)
    {
        if (is_array($this->templatesPath)) {
            if (array_search($path, $this->templatesPath)) {
                throw new \LogicException(sprintf('Templates path "%s" exists.', $path));
            } else {
                $this->templatesPath[] = $path;
            }
        } else if (is_string($this->templatesPath)) {
            $lastTemplate = $this->templatesPath;
            $this->templatesPath = array(
                $lastTemplate, $path
            );
        }
    }
public function addTemplatePath($path)
    {
        if (is_array($this->templatesPath)) {
            if (array_search($path, $this->templatesPath)) {
                throw new \LogicException(sprintf('Templates path "%s" exists.', $path));
            } else {
                $this->templatesPath[] = $path;
            }
        } else if (is_string($this->templatesPath)) {
            $lastTemplate = $this->templatesPath;
            $this->templatesPath = array(
                $lastTemplate, $path
            );
        }
    }
public function addTemplatePath ( $ path ) { if ( is_array ( $ this -> templatesPath ) ) { if ( array_search ( $ path , $ this -> templatesPath ) ) { throw new \ LogicException ( sprintf ( 'Templates path "%s" exists.' , $ path ) ) ; } else { $ this -> templatesPath [ ] = $ path ; } } else if ( is_string ( $ this -> templatesPath ) ) { $ lastTemplate = $ this -> templatesPath ; $ this -> templatesPath = array ( $ lastTemplate , $ path ) ; } }
Add Template Path

@param string $path Templates path
Add Template Path