Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function setBadge(SetBadgeRequest $setBadgeRequest)
 {
     // If the 'application' attribute is not set in the request we try to get a default one from the Pushwoosh
     // client
     if ($setBadgeRequest->getApplication() === null) {
         // The 'application' must be set
         if (!isset($this->application)) {
             throw new PushwooshException('The  \'application\' property is not set !');
         }
         $setBadgeRequest->setApplication($this->application);
     }
     $response = $this->cURLClient->pushwooshCall('setBadge', $setBadgeRequest->jsonSerialize());
     return SetBadgeResponse::create($response);
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function setBadge(SetBadgeRequest $setBadgeRequest)
 {
     $this->pushwhooshRequests[] = $setBadgeRequest;
     return SetBadgeResponse::create(json_decode('{
             "status_code":200,
             "status_message":"OK"
         }', true));
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 public function setBadge(SetBadgeRequest $setBadgeRequest)
 {
     // If the 'application' attribute is not set in the request we try to get a default one from the Pushwoosh
     // client
     $this->setApplicationIfNotSet($setBadgeRequest);
     $response = $this->cURLClient->pushwooshCall('setBadge', $setBadgeRequest->jsonSerialize());
     return SetBadgeResponse::create($response);
 }