Esempio n. 1
0
 /**
  * Turn the array of results to an object array of Tweets.
  *
  * @param array $data Array of tweet results
  *
  * @return array An array of Tweets
  */
 protected function classify($data)
 {
     if (!isset($data) || empty($data)) {
         return;
     }
     $tweets = [];
     foreach ($data as $tweet) {
         $tweet_obj = new Tweet();
         $tweets[] = $tweet_obj->set_data($tweet);
     }
     return $tweets;
 }