class Atom in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-feed/src/Reader/Entry/Atom.php \Zend\Feed\Reader\Entry\Atom
- 8 vendor/zendframework/zend-feed/src/Reader/Feed/Atom.php \Zend\Feed\Reader\Feed\Atom
- 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Atom.php \Zend\Feed\Writer\Renderer\Entry\Atom
- 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Atom.php \Zend\Feed\Writer\Renderer\Feed\Atom
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Atom.php \Zend\Feed\Writer\Renderer\Feed\Atom
Hierarchy
- class \Zend\Feed\Writer\Renderer\Feed\AbstractAtom extends \Renderer\AbstractRenderer
- class \Zend\Feed\Writer\Renderer\Feed\Atom implements \Renderer\RendererInterface
Expanded class hierarchy of Atom
3 string references to 'Atom'
- Feed::export in vendor/
zendframework/ zend-feed/ src/ Writer/ Feed.php - Attempt to build and return the feed resulting from the data set
- Reader::registerCoreExtensions in vendor/
zendframework/ zend-feed/ src/ Reader/ Reader.php - Register core (default) extensions
- Writer::registerCoreExtensions in vendor/
zendframework/ zend-feed/ src/ Writer/ Writer.php - Register core (default) extensions
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Renderer/ Feed/ Atom.php, line 18
Namespace
Zend\Feed\Writer\Renderer\FeedView source
class Atom extends AbstractAtom implements Renderer\RendererInterface {
/**
* Constructor
*
* @param Writer\Feed $container
*/
public function __construct(Writer\Feed $container) {
parent::__construct($container);
}
/**
* Render Atom feed
*
* @return Atom
*/
public function render() {
if (!$this->container
->getEncoding()) {
$this->container
->setEncoding('UTF-8');
}
$this->dom = new DOMDocument('1.0', $this->container
->getEncoding());
$this->dom->formatOutput = true;
$root = $this->dom
->createElementNS(Writer\Writer::NAMESPACE_ATOM_10, 'feed');
$this
->setRootElement($root);
$this->dom
->appendChild($root);
$this
->_setLanguage($this->dom, $root);
$this
->_setBaseUrl($this->dom, $root);
$this
->_setTitle($this->dom, $root);
$this
->_setDescription($this->dom, $root);
$this
->_setImage($this->dom, $root);
$this
->_setDateCreated($this->dom, $root);
$this
->_setDateModified($this->dom, $root);
$this
->_setGenerator($this->dom, $root);
$this
->_setLink($this->dom, $root);
$this
->_setFeedLinks($this->dom, $root);
$this
->_setId($this->dom, $root);
$this
->_setAuthors($this->dom, $root);
$this
->_setCopyright($this->dom, $root);
$this
->_setCategories($this->dom, $root);
$this
->_setHubs($this->dom, $root);
foreach ($this->extensions as $ext) {
$ext
->setType($this
->getType());
$ext
->setRootElement($this
->getRootElement());
$ext
->setDOMDocument($this
->getDOMDocument(), $root);
$ext
->render();
}
foreach ($this->container as $entry) {
if ($this
->getDataContainer()
->getEncoding()) {
$entry
->setEncoding($this
->getDataContainer()
->getEncoding());
}
if ($entry instanceof Writer\Entry) {
$renderer = new Renderer\Entry\Atom($entry);
}
else {
if (!$this->dom->documentElement
->hasAttribute('xmlns:at')) {
$this->dom->documentElement
->setAttribute('xmlns:at', 'http://purl.org/atompub/tombstones/1.0');
}
$renderer = new Renderer\Entry\AtomDeleted($entry);
}
if ($this->ignoreExceptions === true) {
$renderer
->ignoreExceptions();
}
$renderer
->setType($this
->getType());
$renderer
->setRootElement($this->dom->documentElement);
$renderer
->render();
$element = $renderer
->getElement();
$deep = version_compare(PHP_VERSION, '7', 'ge') ? 1 : true;
$imported = $this->dom
->importNode($element, $deep);
$root
->appendChild($imported);
}
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractAtom:: |
protected | function | Set feed authors | |
AbstractAtom:: |
protected | function | Set base URL to feed links | |
AbstractAtom:: |
protected | function | Set feed categories | |
AbstractAtom:: |
protected | function | Set feed copyright | |
AbstractAtom:: |
protected | function | Set date feed was created | |
AbstractAtom:: |
protected | function | Set date feed was last modified | |
AbstractAtom:: |
protected | function | Set feed description | |
AbstractAtom:: |
protected | function | Set feed links | |
AbstractAtom:: |
protected | function | Set feed generator string | 2 |
AbstractAtom:: |
protected | function | Set hubs to which this feed pushes | |
AbstractAtom:: |
protected | function | Set feed identifier | |
AbstractAtom:: |
protected | function | Set feed level logo (image) | |
AbstractAtom:: |
protected | function | Set feed language | |
AbstractAtom:: |
protected | function | Set link to feed | |
AbstractAtom:: |
protected | function | Set feed title | |
Atom:: |
public | function | Render Atom feed | |
Atom:: |
public | function |
Constructor Overrides AbstractAtom:: |