You are here

protected function Entry::getAtomType in Zircon Profile 8.0

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

Detect the presence of any Atom namespaces in use

Return value

string

4 calls to Entry::getAtomType()
Entry::getCategories in vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php
Get all categories
Entry::getDateCreated in vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php
Get the entry creation date
Entry::getDateModified in vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php
Get the entry modification date
Entry::registerNamespaces in vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php
Register the default namespaces for the current feed format

File

vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php, line 620

Class

Entry

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_03) || !empty($prefixAtom03)) {
    return Reader\Reader::TYPE_ATOM_03;
  }
  if ($dom
    ->isDefaultNamespace(Reader\Reader::NAMESPACE_ATOM_10) || !empty($prefixAtom10)) {
    return Reader\Reader::TYPE_ATOM_10;
  }
}