コード例 #1
0
ファイル: App.php プロジェクト: hybridneo/zendgdata
 /**
  * Retrieve previous set of results based on a given feed.
  *
  * @param \ZendGData\App\Feed $feed The feed from which to
  *          retreive the previous set of results.
  * @param string $className (optional) The class of feed to be returned.
  *          If null, the previous feed (if found) will be the same class as
  *          the feed that was given as the first argument.
  * @return \ZendGData\App\Feed|null Returns a
  *          ZendGData\App\Feed or null if no previous set of results
  *          exists.
  */
 public function getPreviousFeed($feed, $className = null)
 {
     $previousLink = $feed->getPreviousLink();
     if (!$previousLink) {
         return null;
     }
     $previousLinkHref = $previousLink->getHref();
     if ($className === null) {
         $className = get_class($feed);
     }
     return $this->getFeed($previousLinkHref, $className);
 }