getFeed() public method

Method to get the feed
public getFeed ( ) : array
return array
Example #1
0
 /**
  * Get method to return the value of feed[$name].
  *
  * @param  string $name
  * @return mixed
  */
 public function __get($name)
 {
     $value = null;
     $alias = null;
     $aliases = array('entry', 'entries', 'images', 'posts', 'statuses', 'tweets', 'updates', 'videos');
     if (in_array($name, $aliases)) {
         $alias = 'items';
     }
     $feed = $this->adapter->getFeed();
     // If the called property exists in the $feed array
     if (isset($feed[$name])) {
         $value = $feed[$name];
         // Else, if the alias to the called property exists in the $feed array
     } else {
         if (null !== $alias && isset($feed[$alias])) {
             $value = $feed[$alias];
         }
     }
     return $value;
 }