public function Feed::getLanguage in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getLanguage()
- 8.0 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 vendor/zendframework/zend-feed/src/Reader/Extension/DublinCore/Feed.php \Zend\Feed\Reader\Extension\DublinCore\Feed::getLanguage()
Get the feed language
Return value
string|null
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ DublinCore/ Feed.php, line 158
Class
Namespace
Zend\Feed\Reader\Extension\DublinCoreCode
public function getLanguage() {
if (array_key_exists('language', $this->data)) {
return $this->data['language'];
}
$language = $this
->getXpath()
->evaluate('string(' . $this
->getXpathPrefix() . '/dc11:language)');
if (!$language) {
$language = $this
->getXpath()
->evaluate('string(' . $this
->getXpathPrefix() . '/dc10:language)');
}
if (!$language) {
$language = null;
}
$this->data['language'] = $language;
return $this->data['language'];
}