Mercurial > hg > isophonics-drupal-site
comparison vendor/zendframework/zend-feed/src/Reader/Feed/AbstractFeed.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 7a779792577d |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
128 * | 128 * |
129 * @return \Zend\Feed\Reader\Entry\EntryInterface | 129 * @return \Zend\Feed\Reader\Entry\EntryInterface |
130 */ | 130 */ |
131 public function current() | 131 public function current() |
132 { | 132 { |
133 if (substr($this->getType(), 0, 3) == 'rss') { | 133 if (0 === strpos($this->getType(), 'rss')) { |
134 $reader = new Reader\Entry\Rss($this->entries[$this->key()], $this->key(), $this->getType()); | 134 $reader = new Reader\Entry\Rss($this->entries[$this->key()], $this->key(), $this->getType()); |
135 } else { | 135 } else { |
136 $reader = new Reader\Entry\Atom($this->entries[$this->key()], $this->key(), $this->getType()); | 136 $reader = new Reader\Entry\Atom($this->entries[$this->key()], $this->key(), $this->getType()); |
137 } | 137 } |
138 | 138 |
261 | 261 |
262 /** | 262 /** |
263 * Return an Extension object with the matching name (postfixed with _Feed) | 263 * Return an Extension object with the matching name (postfixed with _Feed) |
264 * | 264 * |
265 * @param string $name | 265 * @param string $name |
266 * @return \Zend\Feed\Reader\Extension\AbstractFeed | 266 * @return \Zend\Feed\Reader\Extension\AbstractFeed|null |
267 */ | 267 */ |
268 public function getExtension($name) | 268 public function getExtension($name) |
269 { | 269 { |
270 if (array_key_exists($name . '\\Feed', $this->extensions)) { | 270 if (array_key_exists($name . '\\Feed', $this->extensions)) { |
271 return $this->extensions[$name . '\\Feed']; | 271 return $this->extensions[$name . '\\Feed']; |