ZF2-465: Some view helpers depend on renderer methods not defined in Zend\View\Renderer\RendererInterface


The Partial view helper plugin currently has dependencies on renderer methods such as vars() and setVars() which are provided by Zend\View\Renderer\PhpRenderer but are not defined in Zend\View\Renderer\RendererInterface. This limits the usefulness of the Partial helper plugin (and any others which utilise it internally) since they can only be used with the PHP Renderer.

On quick inspection a handful of other helpers appear to be affected, including Layout and HeadMeta, which require the plugin() method.

If the provided view helpers are only intended to be used with PHP templates then Zend\View\Helper\AbstractHelper::setView() should require a concrete implementation of Zend\View\Renderer\PhpRenderer rather than any implementation of Zend\View\Renderer\RendererInterface.

Ideally, Zend\View\Renderer\RendererInterface would be updated to include these additional methods or perhaps an AbstractRenderer could be provided?


This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: