private function assignDeclaredLayout($package, $file)
    {
        $file = lcfirst($file);
        if (substr(strtolower($file), -6) == '.phtml') {
            $file = substr($file, 0, -6);
        }

        $package = $this->app->getPackage($package);
        $pathPieces = array($package['package_path'], 'res', 'layout', $file);
        $path = implode(self::DS, $pathPieces) . '.phtml';
        if (file_exists($path)) {
            $this->layoutLocation = $path;
            return true;
        }
        $e = new LayoutFileNotFoundException('Invalid layout file path, expected: "' . $path . '"');
        $e->setAdditionalData('Layout Path Checked: ', $path);
        throw $e;
    }
private function assignDeclaredLayout($package, $file)
    {
        $file = lcfirst($file);
        if (substr(strtolower($file), -6) == '.phtml') {
            $file = substr($file, 0, -6);
        }

        $package = $this->app->getPackage($package);
        $pathPieces = array($package['package_path'], 'res', 'layout', $file);
        $path = implode(self::DS, $pathPieces) . '.phtml';
        if (file_exists($path)) {
            $this->layoutLocation = $path;
            return true;
        }
        $e = new LayoutFileNotFoundException('Invalid layout file path, expected: "' . $path . '"');
        $e->setAdditionalData('Layout Path Checked: ', $path);
        throw $e;
    }
private function assignDeclaredLayout ( $ package , $ file ) { $ file = lcfirst ( $ file ) ; if ( substr ( strtolower ( $ file ) , - 6 ) == '.phtml' ) { $ file = substr ( $ file , 0 , - 6 ) ; } $ package = $ this -> app -> getPackage ( $ package ) ; $ pathPieces = array ( $ package [ 'package_path' ] , 'res' , 'layout' , $ file ) ; $ path = implode ( self :: DS , $ pathPieces ) . '.phtml' ; if ( file_exists ( $ path ) ) { $ this -> layoutLocation = $ path ; return true ; } $ e = new LayoutFileNotFoundException ( 'Invalid layout file path, expected: "' . $ path . '"' ) ; $ e -> setAdditionalData ( 'Layout Path Checked: ' , $ path ) ; throw $ e ; }
Assign the path to the layout file
@param string $package
@param string $file
@throws LayoutFileNotFoundException
@throws \Phavour\Application\Exception\PackageNotFoundException
@return boolean
Assign the path to the layout file