Class ViewRenderer.
Parameter | Type | Description |
---|
$key | string | |
$value | mixed | |
Parameter | Type | Description |
---|
$name | string | |
Parameter | Type | Description |
---|
$name | string | |
Parameter | Type | Description |
---|
$response | HTML | |
Adds a helper to the view renderer.
public addHelper({Array})
Parameter | Type | Description |
---|
$helper | string | the name of the helper to add |
$args | array | an optional array of arguments to pass to the helper |
$alias | string | an optional alias for the helper |
Retrieves the helpers associated with the current view.
public getHelpers({Array})
Removes a helper from the view renderer.
public removeHelper({Array})
Parameter | Type | Description |
---|
$name | string | the name of the helper to remove |
Magic method to get the value of a property.
Parameter | Type | Description |
---|
$key | string | the name of the property to get |
Populates the view renderer with data.
Parameter | Type | Description |
---|
$array | array | the array of data to populate the view renderer with |
Extends the data available on any defined views.
Parameter | Type | Description |
---|
$array | array | the array of data to extend the view renderer with |
Checks if a view exists.
Parameter | Type | Description |
---|
$view | string | the name of the view to check |
Sets the layout for the view.
If the current view is an instance of Layout
, it loads the specified layout. Otherwise, if the specified layout is not an instance of Layout
, it creates a new Layout
instance. Finally, it sets the view to the specified layout.
Parameter | Type | Description |
---|
$view | string | the layout or view to set |
Sets the view renderer to disable layout rendering.
public setNoLayout({Array})
This method sets the view property to null, which indicates that the layout rendering should be disabled. When the layout rendering is disabled, only the view template will be rendered without any surrounding layout.
Renders a view.
Parameter | Type | Description |
---|
$view | View | The view to render. It can be either a string representing the view file path or an instance of the View class. |
Parameter | Type | Description |
---|
$view | View | |
public offsetExists({Array})
Parameter | Type | Description |
---|
$offset | mixed | |
public offsetGet({Array})
Parameter | Type | Description |
---|
$offset | mixed | |
public offsetSet({Array})
Parameter | Type | Description |
---|
$offset | mixed | |
$value | mixed | |
public offsetUnset({Array})
Parameter | Type | Description |
---|
$offset | mixed | |
Renders a view and returns the rendered output as a string.
private renderView({Array})
Parameter | Type | Description |
---|
$view | View | the view object to render |
Generated by Hazaar API Doc Generator