You are here

public function Feed::getBaseUrl 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::getBaseUrl()

Get the base URI of the feed (if set).

Return value

string|null

1 call to Feed::getBaseUrl()
Feed::absolutiseUri in vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php
Attempt to absolutise the URI, i.e. if a relative URI apply the xml:base value as a prefix to turn into an absolute URI.

File

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

Class

Feed

Namespace

Zend\Feed\Reader\Extension\Atom

Code

public function getBaseUrl() {
  if (array_key_exists('baseUrl', $this->data)) {
    return $this->data['baseUrl'];
  }
  $baseUrl = $this->xpath
    ->evaluate('string(//@xml:base[1])');
  if (!$baseUrl) {
    $baseUrl = null;
  }
  $this->data['baseUrl'] = $baseUrl;
  return $this->data['baseUrl'];
}