$replaceFunction
$replaceFunction : callable
Renderer using `eval()` PHP language construct.
Note: this is not more risky than other evaluation ways. Every adapter will execute the code of the Pug templates (inside code statements and expressions). To be safe, you should not render uncontrolled templates unless your environment is a restricted sandbox.
__construct(\Phug\Renderer $renderer, array|\ArrayObject $options)
AbstractAdapter constructor.
\Phug\Renderer | $renderer | current renderer used. |
array|\ArrayObject | $options | options array/object to be propagated from renderer to the adapter. |
getRenderer() : \Phug\Renderer
Get the current linked renderer.
execute(\Closure $execution, array $variables)
Bind context ($this) to a given closure if passed in local variables, and bind the current adapter as __pug_adapter variable.
\Closure | $execution | Function to be executed to render/display the rendered template. |
array | $variables | Render local variables. |