PHP Class library\App\Layout

Author: Bogdan Ghervan ([email protected])
Inheritance: extends View
Datei anzeigen Open project: cronkeep/cronkeep

Protected Properties

Property Type Description
$_layoutFile string Layout file relative to the templates path.
$_vars array JavaScript variables registry.

Public Methods

Method Description
appendVar ( string $name, mixed $value ) : Layout Push variable $name to JavaScript.
render ( string $template, array $data = null ) : string Renders template and injects it to the layout file.

Protected Methods

Method Description
_getVarsForOutput ( ) : string Returns aggregated variables to send to JavaScript, with values encoded in JSON.

Method Details

_getVarsForOutput() protected method

Returns aggregated variables to send to JavaScript, with values encoded in JSON.
protected _getVarsForOutput ( ) : string
return string

appendVar() public method

Push variable $name to JavaScript.
public appendVar ( string $name, mixed $value ) : Layout
$name string
$value mixed
return Layout

render() public method

Renders template and injects it to the layout file.
public render ( string $template, array $data = null ) : string
$template string
$data array
return string

Property Details

$_layoutFile protected_oe property

Layout file relative to the templates path.
protected string $_layoutFile
return string

$_vars protected_oe property

JavaScript variables registry.
protected array $_vars
return array