/** * Set the renderer instance * * @param \Zend\Markup\Renderer\RendererAbstract $renderer * * @return \Zend\Markup\Renderer\Markup\MarkupAbstract */ public function setRenderer(Renderer\RendererAbstract $renderer) { $this->_renderer = $renderer; $this->setEncoding($renderer->getEncoding()); return $this; }
/** * Execute a single replace token * * @param \Zend\Markup\Token $token * @param array $markup * @return string */ protected function _executeSingleReplace(Markup\Token $token, $markup) { if (isset($markup['tag'])) { if (!isset($markup['attributes'])) { $markup['attributes'] = array(); } $attrs = self::renderAttributes($token, $markup['attributes']); return "<{$markup['tag']}{$attrs} />"; } return parent::_executeSingleReplace($token, $markup); }