ViewInterface
interface ViewInterface (View source)
Interface of a view
Methods
assign(string $key, mixed $value)
Add a variable to the view data collection.
assignMultiple(array $values)
Add multiple variables to the view data collection
StreamInterface
render()
Renders the view
static ViewInterface
createWithOptions(array $options)
Factory method to create an instance with given options.
Details
ViewInterface
assign(string $key, mixed $value)
Add a variable to the view data collection.
Can be chained: $this->view->assign(..., ...)->assign(..., ...);
ViewInterface
assignMultiple(array $values)
Add multiple variables to the view data collection
StreamInterface
render()
Renders the view
static ViewInterface
createWithOptions(array $options)
Factory method to create an instance with given options.