public function Feed::getLanguage in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getLanguage()
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/DublinCore/Feed.php \Zend\Feed\Reader\Extension\DublinCore\Feed::getLanguage()
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getLanguage()
Get the feed language
Return value
string|null
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Feed.php, line 242
Class
Namespace
Zend\Feed\Reader\Extension\AtomCode
public function getLanguage() {
if (array_key_exists('language', $this->data)) {
return $this->data['language'];
}
$language = $this->xpath
->evaluate('string(' . $this
->getXpathPrefix() . '/atom:lang)');
if (!$language) {
$language = $this->xpath
->evaluate('string(//@xml:lang[1])');
}
if (!$language) {
$language = null;
}
$this->data['language'] = $language;
return $this->data['language'];
}