Property | Type | Description | |
---|---|---|---|
$outputFile | string | Output file path |
Method | Description | |
---|---|---|
__construct ( string $inputFile = null, string $outputDir = null ) : Phrozn\Site\View | Initialize page | |
addProcessor ( $processor ) : Phrozn\Site\View | Add text processor | |
compile ( array $vars = [] ) : Phrozn\Site\View | Create static version of a concrete page | |
getFrontMatter ( ) : array | Get YAML front matter from input view | |
getInputFile ( ) : string | Get input file path | |
getInputRootDir ( ) : string | Get input root directory path | |
getOutputDir ( ) : string | Get output directory path | |
getOutputFile ( ) : string | Get output file path | |
getParam ( string $param, mixed $default = null ) : mixed | Get param value | |
getParams ( string $param = null, string $default = [] ) : array | Get view parameters from both front matter and general site options | |
getProcessors ( ) : array | Get list of registered processors | |
getSiteConfig ( ) : array | Get site configuration | |
getTemplate ( ) : string | Get template content from input view | |
hasLayout ( boolean $value = null ) : boolean | Get/set hasLayout setting. Allows to enable/disable layout for a given view | |
removeProcessor ( $processor ) : Phrozn\Site\View | Remove text processor | |
render ( array $vars = [] ) : string | Render view | |
setFrontMatter ( array $frontMatter ) : Phrozn\Has\FrontMatter | Set front matter | |
setInputFile ( $path ) : Phrozn\Site\View | Set input file path | |
setInputRootDir ( string $path ) : Phrozn\Site\View | Set input root directory path | |
setOutputDir ( string $path ) : Phrozn\Site\View | Set output directory path | |
setOutputFile ( string $path ) : Phrozn\Site\View | Set output file path | |
setParam ( string $param, mixed $value ) : Phrozn\Has\Param | Set param | |
setSiteConfig ( array $config ) : Phrozn\Has\SiteConfig | Set site configuration | |
setTemplate ( string $template ) : Phrozn\Has\Template | Set template |
Method | Description | |
---|---|---|
applyLayout ( string $content, array $vars ) : string | Two step view is used. View to wrap is provided with content variable. |
Method | Description | |
---|---|---|
getAppConfig ( ) | ||
locateParam ( $params, $param ) : mixed | Locate nested param (levels separated with dot) in params array | |
parse ( ) : Phrozn\Site\View | Parses input file into front matter and actual template content | |
readSourceFile ( ) : string | Read input file |
public __construct ( string $inputFile = null, string $outputDir = null ) : Phrozn\Site\View | ||
$inputFile | string | Path to page source file |
$outputDir | string | File destination path |
return | Phrozn\Site\View |
public addProcessor ( $processor ) : Phrozn\Site\View | ||
return | Phrozn\Site\View |
public getFrontMatter ( ) : array | ||
return | array |
public getInputRootDir ( ) : string | ||
return | string |
public getOutputDir ( ) : string | ||
return | string |
public getProcessors ( ) : array | ||
return | array | of \Phrozn\Processor items |
public getTemplate ( ) : string | ||
return | string |
public removeProcessor ( $processor ) : Phrozn\Site\View | ||
return | Phrozn\Site\View |
public setFrontMatter ( array $frontMatter ) : Phrozn\Has\FrontMatter | ||
$frontMatter | array | Array of options |
return | Phrozn\Has\FrontMatter |
public setInputFile ( $path ) : Phrozn\Site\View | ||
return | Phrozn\Site\View |
public setInputRootDir ( string $path ) : Phrozn\Site\View | ||
$path | string | Directory path |
return | Phrozn\Site\View |
public setOutputDir ( string $path ) : Phrozn\Site\View | ||
$path | string | Directory path |
return | Phrozn\Site\View |
public setOutputFile ( string $path ) : Phrozn\Site\View | ||
$path | string | File path |
return | Phrozn\Site\View |
public setSiteConfig ( array $config ) : Phrozn\Has\SiteConfig | ||
$config | array | Array of options |
return | Phrozn\Has\SiteConfig |
public setTemplate ( string $template ) : Phrozn\Has\Template | ||
$template | string | Source template |
return | Phrozn\Has\Template |