Пример #1
0
 public function getFromQuery(Provider $provider, Query $query)
 {
     $queryString = $query->getQuery();
     $url = $this->buildUrl($queryString);
     $data = json_decode($this->getUrl($url));
     $gifData = $data->data;
     $gif = new Gif();
     $gif->setUrl($gifData->image_original_url);
     return $gif;
 }
Пример #2
0
 /**
  * Remove query
  *
  * @param Query $query
  */
 public function removeQuery(Query $query)
 {
     $query->setProvider(null);
     $this->queries->removeElement($query);
 }