Example #1
0
File: GData.php Project: stunti/zf2
 /**
  * Retrieve feed as string or object
  *
  * @param mixed $location The location as string or \Zend\GData\Query
  * @param string $className The class type to use for returning the feed
  * @throws \Zend\GData\App\InvalidArgumentException
  * @return string|\Zend\GData\App\Feed Returns string only if the object
  *                                    mapping has been disabled explicitly
  *                                    by passing false to the
  *                                    useObjectMapping() function.
  */
 public function getFeed($location, $className = '\\Zend\\GData\\Feed')
 {
     if (is_string($location)) {
         $uri = $location;
     } elseif ($location instanceof Query) {
         $uri = $location->getQueryUrl();
     } else {
         throw new App\InvalidArgumentException('You must specify the location as either a string URI ' . 'or a child of Zend\\GData\\Query');
     }
     return parent::getFeed($uri, $className);
 }