public function findTemplate($name)
    {
        if ($this->files->exists($name)) {
            return $name;
        }

        $name = $this->normalizeName($name);

        if (isset($this->cache[$name])) {
            return $this->cache[$name];
        }

        try {
            $this->cache[$name] = $this->finder->find($name);
        } catch (InvalidArgumentException $ex) {
            throw new LoaderError($ex->getMessage());
        }

        return $this->cache[$name];
    }
public function findTemplate($name)
    {
        if ($this->files->exists($name)) {
            return $name;
        }

        $name = $this->normalizeName($name);

        if (isset($this->cache[$name])) {
            return $this->cache[$name];
        }

        try {
            $this->cache[$name] = $this->finder->find($name);
        } catch (InvalidArgumentException $ex) {
            throw new LoaderError($ex->getMessage());
        }

        return $this->cache[$name];
    }
public function findTemplate ( $ name ) { if ( $ this -> files -> exists ( $ name ) ) { return $ name ; } $ name = $ this -> normalizeName ( $ name ) ; if ( isset ( $ this -> cache [ $ name ] ) ) { return $ this -> cache [ $ name ] ; } try { $ this -> cache [ $ name ] = $ this -> finder -> find ( $ name ) ; } catch ( InvalidArgumentException $ ex ) { throw new LoaderError ( $ ex -> getMessage ( ) ) ; } return $ this -> cache [ $ name ] ; }
Return path to template without the need for the extension.

@param string $name Template file name or path.

@throws LoaderError
@return string Path to template
Return path to template without the need for the extension .