protected function GenerateResponse() { try { $this->response = PersonalYAgentesController::NuevoRol(isset($_POST['nombre']) ? $_POST['nombre'] : null, isset($_POST['descripcion']) ? $_POST['descripcion'] : null, isset($_POST['id_perfil']) ? $_POST['id_perfil'] : null, isset($_POST['id_rol_padre']) ? $_POST['id_rol_padre'] : null, isset($_POST['id_tarifa_compra']) ? $_POST['id_tarifa_compra'] : null, isset($_POST['id_tarifa_venta']) ? $_POST['id_tarifa_venta'] : null, isset($_POST['salario']) ? $_POST['salario'] : "0"); } catch (Exception $e) { //Logger::error($e); throw new ApiException($this->error_dispatcher->invalidDatabaseOperation($e->getMessage())); } }