Property | Type | Description | |
---|---|---|---|
$globalData | array | Data that is passed to all templates. | |
$loader | Used to find the file that has failed. |
Method | Description | |
---|---|---|
__construct ( TwigBridge\Engine\Compiler $compiler, |
Create a new Twig view engine instance. | |
get ( string $path, array $data = [] ) : string | Get the evaluated contents of the view. | |
getGlobalData ( ) : array | Get the global data. | |
setGlobalData ( array $globalData ) : void | Set global data sent to the view. |
Method | Description | |
---|---|---|
handleTwigError ( Twig_Error $ex ) | Handle a TwigError exception. |
public __construct ( TwigBridge\Engine\Compiler $compiler, |
||
$compiler | TwigBridge\Engine\Compiler | |
$loader | ||
$globalData | array |
protected handleTwigError ( Twig_Error $ex ) | ||
$ex | Twig_Error |
public setGlobalData ( array $globalData ) : void | ||
$globalData | array | Global data. |
return | void |
protected array $globalData | ||
return | array |