src/Panda/Views/Viewer.php
private function getViewFilePath($name, $extension = 'html')
    {
        // Check view file
        $viewFile = $this->getViewFile($name, $extension);
        if (!file_exists($viewFile)) {
            // Check for view folder
            $viewBaseName = $this->getViewFolder($name) . DIRECTORY_SEPARATOR . 'view';

            // Select the view file
            $viewFile = (file_exists($viewBaseName . '.php') ? $viewBaseName . '.php' : $viewBaseName . '.html');
            $viewFile = (file_exists($viewFile) ? $viewFile : null);
        }

        // Check if the file is executable (php)
        if (preg_match('/\.php$/', $viewFile)) {
            $this->executable = true;
        }

        return $viewFile;
    }
private function getViewFilePath($name, $extension = 'html')
    {
        // Check view file
        $viewFile = $this->getViewFile($name, $extension);
        if (!file_exists($viewFile)) {
            // Check for view folder
            $viewBaseName = $this->getViewFolder($name) . DIRECTORY_SEPARATOR . 'view';

            // Select the view file
            $viewFile = (file_exists($viewBaseName . '.php') ? $viewBaseName . '.php' : $viewBaseName . '.html');
            $viewFile = (file_exists($viewFile) ? $viewFile : null);
        }

        // Check if the file is executable (php)
        if (preg_match('/\.php$/', $viewFile)) {
            $this->executable = true;
        }

        return $viewFile;
    }
private function getViewFilePath ( $ name , $ extension = 'html' ) { // Check view file $ viewFile = $ this -> getViewFile ( $ name , $ extension ) ; if ( ! file_exists ( $ viewFile ) ) { // Check for view folder $ viewBaseName = $ this -> getViewFolder ( $ name ) . DIRECTORY_SEPARATOR . 'view' ; // Select the view file $ viewFile = ( file_exists ( $ viewBaseName . '.php' ) ? $ viewBaseName . '.php' : $ viewBaseName . '.html' ) ; $ viewFile = ( file_exists ( $ viewFile ) ? $ viewFile : null ) ; } // Check if the file is executable (php) if ( preg_match ( '/\.php$/' , $ viewFile ) ) { $ this -> executable = true ; } return $ viewFile ; }
Get the view file to be rendered for output.

@param string $name
@param string $extension

@return null|string
Get the view file to be rendered for output .