/** * Sets the request and determines the format in which the request data is * to be returned to the client */ public function set_request($request) { $this->request = $request; // Determine the response type if (!$this->api_service->verify_array_index($request, 'resp')) { $this->set_response_type('json'); } else { $this->set_response_type($request['resp']); } }