httpCallBack = $httpCallBack; } /** * Get HttpCallBack for this controller * @return HttpCallBack The HttpCallBack object set for this controller */ public function getHttpCallBack() { return $this->httpCallBack; } /** * Get a new JsonMapper instance for mapping objects * @return \apimatic\jsonmapper\JsonMapper JsonMapper instance */ protected function getJsonMapper() { $mapper = new JsonMapper(); return $mapper; } protected function validateResponse(HttpResponse $response, HttpContext $_httpContext) { if (($response->getStatusCode() < 200) || ($response->getStatusCode() > 208)) { //[200,208] = HTTP OK throw new APIException('HTTP Response Not OK', $_httpContext); } } }