Fully Qualified Name: | Laminas\View\Renderer\PhpRenderer |
Implements: | RendererInterface, TreeRendererInterface |
Class for Laminas\View\Strategy\PhpRendererStrategy to help enforce private constructs.
Note: all private variables in this class are prefixed with "__". This is to mark them as part of the internal implementation, and thus prevent conflict with variables injected into the renderer.
Convenience methods for build in helpers (@see __call):
Name | Description | Defined By |
---|---|---|
__call() | Overloading: proxy to helpers | PhpRenderer |
__clone() | Make sure View variables are cloned when the view is cloned. | PhpRenderer |
__construct() | Constructor. | PhpRenderer |
__get() | Overloading: proxy to Variables container | PhpRenderer |
__isset() | Overloading: proxy to Variables container | PhpRenderer |
__set() | Overloading: proxy to Variables container | PhpRenderer |
__unset() | Overloading: proxy to Variables container | PhpRenderer |
addTemplate() | Add a template to the stack | PhpRenderer |
canRenderTrees() | Can we render trees, or are we configured to do so? | PhpRenderer |
get() | Get a single variable | PhpRenderer |
getEngine() | Return the template engine object | PhpRenderer |
getFilterChain() | Retrieve filter chain for post-filtering script content | PhpRenderer |
getHelperPluginManager() | Get helper plugin manager instance | PhpRenderer |
init() | Allow custom object initialization when extending PhpRenderer | PhpRenderer |
plugin() | Get plugin instance | PhpRenderer |
render() | Processes a view script and returns the output. | PhpRenderer |
resolver() | Retrieve template name or template resolver | PhpRenderer |
setCanRenderTrees() | Set flag indicating whether or not we should render trees of view models | PhpRenderer |
setFilterChain() | Set filter chain | PhpRenderer |
setHelperPluginManager() | Set helper plugin manager instance | PhpRenderer |
setResolver() | Set script resolver | PhpRenderer |
setVars() | Set variable storage | PhpRenderer |
vars() | Get a single variable, or all variables | PhpRenderer |
Overloading: proxy to helpers
Proxies to the attached plugin manager to retrieve, return, and potentially execute helpers.
Parameter Name | Type | Description |
---|---|---|
$method | string | |
$argv | array |
Returns: mixed
Make sure View variables are cloned when the view is cloned.
Returns: \PhpRenderer
Constructor.
Parameter Name | Type | Description |
---|---|---|
$config | array | Configuration |
Returns:
Overloading: proxy to Variables container
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: mixed
Overloading: proxy to Variables container
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: bool
Overloading: proxy to Variables container
Parameter Name | Type | Description |
---|---|---|
$name | string | |
$value | mixed |
Returns: void
Overloading: proxy to Variables container
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: void
Add a template to the stack
Parameter Name | Type | Description |
---|---|---|
$template | string |
Returns: \PhpRenderer
Can we render trees, or are we configured to do so?
Returns: bool
Get a single variable
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: mixed
Return the template engine object
Returns the object instance, as it is its own template engine
Returns: \PhpRenderer
Retrieve filter chain for post-filtering script content
Returns: \FilterChain
Get helper plugin manager instance
Returns: \HelperPluginManager
Allow custom object initialization when extending PhpRenderer
Triggered by {@link __construct() the constructor} as its final action.
Returns: void
Get plugin instance
Parameter Name | Type | Description |
---|---|---|
$name | string | Name |
$options | null|array | Options |
Returns: \AbstractHelper
Processes a view script and returns the output.
Parameter Name | Type | Description |
---|---|---|
$nameOrModel | string|\Model | Either |
$values | null|array|\Traversable | Values |
Returns: string The script output.
Retrieve template name or template resolver
Parameter Name | Type | Description |
---|---|---|
$name | null|string |
Returns: string|\Resolver
Set flag indicating whether or not we should render trees of view models
If set to true, the View instance will not attempt to render children separately, but instead pass the root view model directly to the PhpRenderer. It is then up to the developer to render the children from within the view script.
Parameter Name | Type | Description |
---|---|---|
$renderTrees | bool |
Returns: \PhpRenderer
Set filter chain
Parameter Name | Type | Description |
---|---|---|
$filters | \FilterChain |
Returns: \PhpRenderer
Set helper plugin manager instance
Parameter Name | Type | Description |
---|---|---|
$helpers | string|\HelperPluginManager |
Returns: \PhpRenderer
Set script resolver
Parameter Name | Type | Description |
---|---|---|
$resolver | \Resolver |
Returns: \PhpRenderer
Set variable storage
Expects either an array, or an object implementing ArrayAccess.
Parameter Name | Type | Description |
---|---|---|
$variables | array|\ArrayAccess |
Returns: \PhpRenderer
Get a single variable, or all variables
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: mixed