trait ViewFileTrait

ViewFileTrait

Traits

Patterns\Traits\TemplateViewTrait

Methods

string
render( string $view = null, array $params = array())

Building of a view content including a view file passing it parameters

array
getDefaultViewParams()

Get the default parameters for all views

string
getTemplate( string $name)

Search a view file in the current file system

Details

at line 48
string render( string $view = null, array $params = array())

Building of a view content including a view file passing it parameters

Parameters

string $view The view filename (which must exist)
array $params An array of the parameters passed for the view parsing

Return Value

string Returns the view file content rendering

Exceptions

Exception

at line 78
array getDefaultViewParams()

Get the default parameters for all views

Return Value

array The array of default parameters

at line 89
string getTemplate( string $name)

Search a view file in the current file system

Parameters

string $name The file path to search

Return Value

string The path of the file found