_errors = new ResponseErrorErrors($this->data["errors"]); $this->_request = $request; } public function get_error($name = null) { if (!is_null($name)) { if (isset($this->errors->{$name})) { return $this->errors->{$name}; } return null; } return $this->errors; } }