Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function getTags(GetTagsRequest $getTagsRequest)
 {
     // If the 'application' attribute is not set in the request we try to get a default one from the Pushwoosh
     // client
     if ($getTagsRequest->getApplication() === null) {
         // The 'application' must be set
         if (!isset($this->application)) {
             throw new PushwooshException('The  \'application\' property is not set !');
         }
         $getTagsRequest->setApplication($this->application);
     }
     // If the 'auth' parameter is not set in the request we try to get it from the Pushwoosh client
     if ($getTagsRequest->getAuth() === null) {
         // The 'auth' parameter is expected here
         if (!isset($this->auth)) {
             throw new PushwooshException('The \'auth\' parameter is not set !');
             // Use the 'auth' parameter defined in the Pushwoosh client
         } else {
             $getTagsRequest->setAuth($this->auth);
         }
     }
     $response = $this->cURLClient->pushwooshCall('getTags', $getTagsRequest->jsonSerialize());
     return GetTagsResponse::create($response);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function getTags(GetTagsRequest $getTagsRequest)
 {
     $this->pushwhooshRequests[] = $getTagsRequest;
     return GetTagsResponse::create(json_decode('{
           "status_code": 200,
           "status_message": "OK"
           "response": {
             "result": {
               "Language": "fr"
             }
           }
         }', true));
 }
Ejemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 public function getTags(GetTagsRequest $getTagsRequest)
 {
     // If the 'application' attribute is not set in the request we try to get a default one from the Pushwoosh
     // client
     $this->setApplicationIfNotSet($getTagsRequest);
     // If the 'auth' parameter is not set in the request we try to get it from the Pushwoosh client
     $this->setAuthIfNotSet($getTagsRequest);
     $response = $this->cURLClient->pushwooshCall('getTags', $getTagsRequest->jsonSerialize());
     return GetTagsResponse::create($response);
 }