Zend\View\Renderer\PhpRenderer
Class for Zend\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):
Synopsis
class PhpRenderer
implements
RendererInterface,TreeRendererInterface
{
- // members
- private string $__content;
- private bool $__renderTrees;
- private null|string $__template;
- private array $__templates;
- private ResolverInterface $__templateResolver;
- private string $__file;
- private HelperPluginManager $__helpers;
- private FilterChain $__filterChain;
- private ArrayAccess|array $__vars;
- private array $__varsCache;
- private array $__pluginCache;
- // methods
- public void __construct()
- public PhpRenderer getEngine()
- public void init()
- public PhpRenderer setResolver()
- public string|Resolver resolver()
- public PhpRenderer setVars()
- public mixed vars()
- public mixed get()
- public mixed __get()
- public void __set()
- public bool __isset()
- public void __unset()
- public PhpRenderer setHelperPluginManager()
- public HelperPluginManager getHelperPluginManager()
- public AbstractHelper plugin()
- public mixed __call()
- public PhpRenderer setFilterChain()
- public FilterChain getFilterChain()
- public string render()
- public PhpRenderer setCanRenderTrees()
- public bool canRenderTrees()
- public PhpRenderer addTemplate()
- public PhpRenderer __clone()
Hierarchy
Tasks
Line | Task |
---|---|
149+ | handle passing helper plugin manager, options |
149+ | handle passing filter chain, options |
149+ | handle passing variables object, options |
149+ | handle passing resolver object, options |
Members
private
- $__content — string
- $__file
—
string
Script file name to execute - $__filterChain — Zend\Filter\FilterChain
- $__helpers
—
Zend\View\HelperPluginManager
Helper plugin manager - $__pluginCache — array
- $__renderTrees — Zend\View\Renderer\bool
- $__template
—
Zend\View\Renderer\null|string
Template being rendered - $__templateResolver
—
Zend\View\Resolver\ResolverInterface
Template resolver - $__templates
—
array
Queue of templates to render - $__vars — Zend\View\Renderer\ArrayAccess|array
- $__varsCache — array
Methods
public
- __construct() — Constructor.
- __call() — Overloading: proxy to helpers
- __clone() — Make sure View variables are cloned when the view is cloned.
- __get() — Overloading: proxy to Variables container
- __isset() — Overloading: proxy to Variables container
- __set() — Overloading: proxy to Variables container
- __unset() — Overloading: proxy to Variables container
- addTemplate() — Add a template to the stack
- canRenderTrees() — Can we render trees, or are we configured to do so?
- get() — Get a single variable
- getEngine() — Return the template engine object
- getFilterChain() — Retrieve filter chain for post-filtering script content
- getHelperPluginManager() — Get helper plugin manager instance
- init() — Allow custom object initialization when extending PhpRenderer
- plugin() — Get plugin instance
- render() — Processes a view script and returns the output.
- resolver() — Retrieve template name or template resolver
- setCanRenderTrees() — Set flag indicating whether or not we should render trees of view models
- setFilterChain() — Set filter chain
- setHelperPluginManager() — Set helper plugin manager instance
- setResolver() — Set script resolver
- setVars() — Set variable storage
- vars() — Get a single variable, or all variables