Пример #1
0
 /**
  * result in $this->getPhotos();
  *
  * {@inheritdoc}
  */
 public function doRequest()
 {
     $result = $this->execApi();
     if ($result && ($json = $this->getJsonResponse())) {
         if (isset($json->response) && $json->response) {
             foreach ($json->response as $item) {
                 $photo = new PhotoFull();
                 $photo->fillByJson($item);
                 $this->photos[] = $photo;
             }
             return true;
         }
     }
     return false;
 }
 /**
  * result in $this->getPhotos();
  *
  * {@inheritdoc}
  */
 public function doRequest()
 {
     $this->setRequiredParams(["group_id", "photo", "server", "hash"]);
     $result = $this->execApi();
     if ($result && ($json = $this->getJsonResponse())) {
         if (isset($json->response) && $json->response) {
             foreach ($json->response as $item) {
                 $photo = new PhotoFull();
                 $photo->fillByJson($item);
                 $this->photos[] = $photo;
             }
             return true;
         }
     }
     return false;
 }