/** * ErrorResponseObject constructor. * @param $error */ public function __construct($code, $message, $hint = null) { parent::__construct(); $this->setStatusCode($code); $this->setRootElementName('Error'); $this->error = new stdClass(); $this->error->code = $code; $this->error->message = $message; if ($hint !== null) { $this->error->hint = $hint; } }