You are here

public function FeedSet::offsetGet in Zircon Profile 8

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

Supports lazy loading of feeds using Reader::import() but delegates any other operations to the parent class.

Parameters

string $offset:

Return value

mixed

File

vendor/zendframework/zend-feed/src/Reader/FeedSet.php, line 118

Class

FeedSet

Namespace

Zend\Feed\Reader

Code

public function offsetGet($offset) {
  if ($offset == 'feed' && !$this
    ->offsetExists('feed')) {
    if (!$this
      ->offsetExists('href')) {
      return;
    }
    $feed = Reader::import($this
      ->offsetGet('href'));
    $this
      ->offsetSet('feed', $feed);
    return $feed;
  }
  return parent::offsetGet($offset);
}