You are here

protected function Feed::registerNamespaces in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Syndication/Feed.php \Zend\Feed\Reader\Extension\Syndication\Feed::registerNamespaces()
  2. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::registerNamespaces()
  3. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Podcast/Feed.php \Zend\Feed\Reader\Extension\Podcast\Feed::registerNamespaces()
  4. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/DublinCore/Feed.php \Zend\Feed\Reader\Extension\DublinCore\Feed::registerNamespaces()
  5. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/CreativeCommons/Feed.php \Zend\Feed\Reader\Extension\CreativeCommons\Feed::registerNamespaces()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::registerNamespaces()

Register the default namespaces for the current feed format

File

vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php, line 499

Class

Feed

Namespace

Zend\Feed\Reader\Extension\Atom

Code

protected function registerNamespaces() {
  if ($this
    ->getType() == Reader\Reader::TYPE_ATOM_10 || $this
    ->getType() == Reader\Reader::TYPE_ATOM_03) {
    return;

    // pre-registered at Feed level
  }
  $atomDetected = $this
    ->getAtomType();
  switch ($atomDetected) {
    case Reader\Reader::TYPE_ATOM_03:
      $this->xpath
        ->registerNamespace('atom', Reader\Reader::NAMESPACE_ATOM_03);
      break;
    default:
      $this->xpath
        ->registerNamespace('atom', Reader\Reader::NAMESPACE_ATOM_10);
      break;
  }
}