Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Feed / Reader / Feed / Atom / Source.php
blob3055dc3215f7575c084fdbc5402e6a91a715e223
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Feed\Reader\Feed\Atom;
12 use DOMElement;
13 use DOMXPath;
14 use Zend\Feed\Reader;
15 use Zend\Feed\Reader\Feed;
17 /**
19 class Source extends Feed\Atom
22 /**
23 * Constructor: Create a Source object which is largely just a normal
24 * Zend\Feed\Reader\AbstractFeed object only designed to retrieve feed level
25 * metadata from an Atom entry's source element.
27 * @param DOMElement $source
28 * @param string $xpathPrefix Passed from parent Entry object
29 * @param string $type Nearly always Atom 1.0
31 public function __construct(DOMElement $source, $xpathPrefix, $type = Reader\Reader::TYPE_ATOM_10)
33 $this->domDocument = $source->ownerDocument;
34 $this->xpath = new DOMXPath($this->domDocument);
35 $this->data['type'] = $type;
36 $this->registerNamespaces();
37 $this->loadExtensions();
39 $manager = Reader\Reader::getExtensionManager();
40 $extensions = array('Atom\Feed', 'DublinCore\Feed');
42 foreach ($extensions as $name) {
43 $extension = $manager->get($name);
44 $extension->setDomDocument($this->domDocument);
45 $extension->setType($this->data['type']);
46 $extension->setXpath($this->xpath);
47 $this->extensions[$name] = $extension;
50 foreach ($this->extensions as $extension) {
51 $extension->setXpathPrefix(rtrim($xpathPrefix, '/') . '/atom:source');
55 /**
56 * Since this is not an Entry carrier but a vehicle for Feed metadata, any
57 * applicable Entry methods are stubbed out and do nothing.
60 /**
61 * @return void
63 public function count() {}
65 /**
66 * @return void
68 public function current() {}
70 /**
71 * @return void
73 public function key() {}
75 /**
76 * @return void
78 public function next() {}
80 /**
81 * @return void
83 public function rewind() {}
85 /**
86 * @return void
88 public function valid() {}
90 /**
91 * @return void
93 protected function indexEntries() {}