interface ViewInterface implements HasContextInterface, ResponsableInterface (View source)

Represent and render a view to a string.

Methods

mixed
getContext(string|null $key = null)

Get context values.

with(string|array $key, mixed $value = null)

Add context values.

ResponseInterface
toResponse()

Convert to Psr\Http\Message\ResponseInterface.

string
getName()

Get name.

setName(string $name)

Set name.

string
toString()

Render the view to a string.

Details

mixed getContext(string|null $key = null)

Get context values.

Parameters

string|null $key

Return Value

mixed

HasContextInterface with(string|array $key, mixed $value = null)

Add context values.

Parameters

string|array $key
mixed $value

Return Value

HasContextInterface $this

ResponseInterface toResponse()

Convert to Psr\Http\Message\ResponseInterface.

Return Value

ResponseInterface

string getName()

Get name.

Return Value

string

ViewInterface setName(string $name)

Set name.

Parameters

string $name

Return Value

ViewInterface $this

string toString()

Render the view to a string.

Return Value

string