3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Feed\Writer\Extension;
17 abstract class AbstractRenderer implements RendererInterface
22 protected $dom = null;
27 protected $entry = null;
32 protected $base = null;
37 protected $container = null;
42 protected $type = null;
47 protected $rootElement = null;
50 * Encoding of all text values
54 protected $encoding = 'UTF-8';
57 * Set the data container
59 * @param mixed $container
60 * @return AbstractRenderer
62 public function setDataContainer($container)
64 $this->container = $container;
72 * @return AbstractRenderer
74 public function setEncoding($enc)
76 $this->encoding = $enc;
85 public function getEncoding()
87 return $this->encoding;
91 * Set DOMDocument and DOMElement on which to operate
93 * @param DOMDocument $dom
94 * @param DOMElement $base
95 * @return AbstractRenderer
97 public function setDomDocument(DOMDocument $dom, DOMElement $base)
105 * Get data container being rendered
109 public function getDataContainer()
111 return $this->container;
117 * @param string $type
118 * @return AbstractRenderer
120 public function setType($type)
131 public function getType()
137 * Set root element of document
139 * @param DOMElement $root
140 * @return AbstractRenderer
142 public function setRootElement(DOMElement $root)
144 $this->rootElement = $root;
153 public function getRootElement()
155 return $this->rootElement;
159 * Append namespaces to feed
163 // @codingStandardsIgnoreStart
164 abstract protected function _appendNamespaces();
165 // @codingStandardsIgnoreEnd