\Phug\RendererAdapterInterface

Interface OptionInterface.

Summary

Methods
Constants
hasOption()
getOption()
setOption()
getOptions()
setOptions()
setOptionsRecursive()
setOptionsDefaults()
unsetOption()
__construct()
getRenderer()
captureBuffer()
render()
display()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

hasOption()

hasOption(string|array  $name) : mixed

Parameters

string|array $name

Returns

mixed

getOption()

getOption(string|array  $name) : mixed

Parameters

string|array $name

Returns

mixed

setOption()

setOption(string|array  $name, mixed  $value) : $this

Parameters

string|array $name
mixed $value

Returns

$this

getOptions()

getOptions() : array

Returns

array

setOptions()

setOptions(array  $options) : $this

Parameters

array $options

Returns

$this

setOptionsRecursive()

setOptionsRecursive(array  $options) : $this

Parameters

array $options

Returns

$this

setOptionsDefaults()

setOptionsDefaults(array  $options) : $this

Parameters

array $options

Returns

$this

unsetOption()

unsetOption(string|array  $name) : $this

Parameters

string|array $name

Returns

$this

__construct()

__construct(\Phug\Renderer  $renderer, array|\ArrayObject  $options) 

Parameters

\Phug\Renderer $renderer
array|\ArrayObject $options

getRenderer()

getRenderer() : \Phug\Renderer

Return the renderer the adapter was constructed with.

Returns

\Phug\Renderer

captureBuffer()

captureBuffer(callable  $display) : mixed

Capture buffered output of a callable display action.

Parameters

callable $display

the action that potentially send output to the buffer.

Throws

\Throwable

Returns

mixed

render()

render(string  $php, array  $parameters) : string

Return renderer HTML.

Parameters

string $php

PHP srouce code

array $parameters

variables names and values

Returns

string

display()

display(string  $php, array  $parameters) 

Display renderer HTML.

Parameters

string $php

PHP srouce code

array $parameters

variables names and values