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