src/Engines/PlainPhp.php
protected function findTemplateFile($file)
    {
        //Add missing extension
        $ext = pathinfo($file, PATHINFO_EXTENSION);
        $file = ($ext === '') ? $file . '.'.$this->getExtension() : $file;

        $found = false;
        foreach ($this->locations as $location) {
            if (is_file($location . '/' . $file)) {
                $found = true;
                $file = $location . '/' . $file;
                continue;
            }
        }

        if (!$found) {
            throw new TemplateNotFoundException('This template was not found in any of the registered locations: ' . $file);
        }

        return $file;
    }
protected function findTemplateFile($file)
    {
        //Add missing extension
        $ext = pathinfo($file, PATHINFO_EXTENSION);
        $file = ($ext === '') ? $file . '.'.$this->getExtension() : $file;

        $found = false;
        foreach ($this->locations as $location) {
            if (is_file($location . '/' . $file)) {
                $found = true;
                $file = $location . '/' . $file;
                continue;
            }
        }

        if (!$found) {
            throw new TemplateNotFoundException('This template was not found in any of the registered locations: ' . $file);
        }

        return $file;
    }
protected function findTemplateFile ( $ file ) { //Add missing extension $ ext = pathinfo ( $ file , PATHINFO_EXTENSION ) ; $ file = ( $ ext === '' ) ? $ file . '.' . $ this -> getExtension ( ) : $ file ; $ found = false ; foreach ( $ this -> locations as $ location ) { if ( is_file ( $ location . '/' . $ file ) ) { $ found = true ; $ file = $ location . '/' . $ file ; continue ; } } if ( ! $ found ) { throw new TemplateNotFoundException ( 'This template was not found in any of the registered locations: ' . $ file ) ; } return $ file ; }
Finds the file by looping through locations
@param string $file
@return string
@throws TemplateNotFoundException
Finds the file by looping through locations