/** * Infer the response type from the responseClass value */ protected function inferResponseType() { static $primitives = array('array' => 1, 'boolean' => 1, 'string' => 1, 'integer' => 1, '' => 1); if (isset($primitives[$this->responseClass])) { $this->responseType = self::TYPE_PRIMITIVE; } elseif ($this->description && $this->description->hasModel($this->responseClass)) { $this->responseType = self::TYPE_MODEL; } else { $this->responseType = self::TYPE_CLASS; } }