PHP Class library\App\Layout

Author: Bogdan Ghervan ([email protected])
Inheritance: extends View
Afficher le fichier Open project: cronkeep/cronkeep

Protected Properties

Свойство Type Description
$_layoutFile string Layout file relative to the templates path.
$_vars array JavaScript variables registry.

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

_getVarsForOutput() protected méthode

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

appendVar() public méthode

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

render() public méthode

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

Property Details

$_layoutFile protected_oe property

Layout file relative to the templates path.
protected string $_layoutFile
Résultat string

$_vars protected_oe property

JavaScript variables registry.
protected array $_vars
Résultat array