class View

View.

Properties

protected string $path View path.
protected array $variables View variables.
protected RendererInterface $renderer View renderer instance.

Methods

__construct(string $path, array $variables, RendererInterface $renderer)

Constructor.

array
getVariables()

Returns the assigned view variables.

getRenderer()

Returns the renderer instance.

assign(string $name, mixed $value)

Assign a local view variable.

string
render()

Returns the rendered view.

Details

at line 45
__construct(string $path, array $variables, RendererInterface $renderer)

Constructor.

Parameters

string $path View path
array $variables View variables
RendererInterface $renderer Renderer instance

at line 59
array getVariables()

Returns the assigned view variables.

Return Value

array

at line 69
RendererInterface getRenderer()

Returns the renderer instance.

Return Value

RendererInterface

at line 81
View assign(string $name, mixed $value)

Assign a local view variable.

Parameters

string $name Variable name
mixed $value View variable

Return Value

View

at line 93
string render()

Returns the rendered view.

Return Value

string