You are here

protected function Feed::getAtomType in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getAtomType()

Detect the presence of any Atom namespaces in use

1 call to Feed::getAtomType()
Feed::registerNamespaces in vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php
Register the default namespaces for the current feed format

File

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

Class

Feed

Namespace

Zend\Feed\Reader\Extension\Atom

Code

protected function getAtomType() {
  $dom = $this
    ->getDomDocument();
  $prefixAtom03 = $dom
    ->lookupPrefix(Reader\Reader::NAMESPACE_ATOM_03);
  $prefixAtom10 = $dom
    ->lookupPrefix(Reader\Reader::NAMESPACE_ATOM_10);
  if ($dom
    ->isDefaultNamespace(Reader\Reader::NAMESPACE_ATOM_10) || !empty($prefixAtom10)) {
    return Reader\Reader::TYPE_ATOM_10;
  }
  if ($dom
    ->isDefaultNamespace(Reader\Reader::NAMESPACE_ATOM_03) || !empty($prefixAtom03)) {
    return Reader\Reader::TYPE_ATOM_03;
  }
}