public function registerNewUser() { if (XmlRequestValidator::isValidReigsterNewUerRequest($this->requestData)) { $username = $this->requestData->body->username; $password = $this->requestData->body->password; $email = $this->requestData->body->email; $result = Execute::registerNewUser($username, $password, $email); if ($result == true) { //retrun success response $this->response = XmlBuilder::registerNewUserSuccessfullResponse("plain"); } else { //return failed response Report::error(__METHOD__ . "," . __LINE__, "some required data is missing in the request!"); $this->response = XmlBuilder::failed_response("plain", 1, 0, "some required data is missing in the request!"); } } else { Report::error(__METHOD__ . "," . __LINE__, "invalid register new user request!"); $this->invalidRequest(); } }