public function execute()
 {
     $uriParts = $this->context->actionContext->get_uriParts();
     $this->setBaseUri($uriParts);
     $params = $this->context->request->get_params();
     $method = $this->context->request->get_httpMethod();
     $this->context->actionContext->controller = $this;
     $this->context->actionContext->action = "execute";
     try {
         $this->context->actionContext->action = "showMessage";
         $this->context->actionContext->args = new _hx_array(array());
         $this->context->actionContext->get_uriParts()->splice(0, 0);
         $wrappingRequired = null;
         $i = haxe_rtti_Meta::getFields(_hx_qtype("ufront.app.DefaultUfrontController"))->showMessage->wrapResult[0];
         $wrappingRequired = $i;
         $result = $this->wrapResult($this->showMessage(), $wrappingRequired);
         $this->setContextActionResultWhenFinished($result);
         return $result;
         throw new HException(ufront_web_HttpError::pageNotFound(_hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 442, "className" => "ufront.app.DefaultUfrontController", "methodName" => "execute"))));
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         return ufront_core_SurpriseTools::asSurpriseError($e, "Uncaught error while executing " . Std::string($this->context->actionContext->controller) . "." . _hx_string_or_null($this->context->actionContext->action) . "()", _hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 445, "className" => "ufront.app.DefaultUfrontController", "methodName" => "execute")));
     }
 }
 public function log($ctx, $appMessages)
 {
     if (!php_Boot::$skip_constructor) {
         $messages = new _hx_array(array());
         $userDetails = $ctx->request->get_clientIP();
         if ((null !== $ctx->session ? $ctx->session->get_id() : null) !== null) {
             $userDetails .= " " . _hx_string_or_null(null !== $ctx->session ? $ctx->session->get_id() : null);
         }
         if (($ctx->auth !== null && $ctx->auth->get_currentUser() !== null ? $ctx->auth->get_currentUser()->get_userID() : null) !== null) {
             $userDetails .= " " . _hx_string_or_null($ctx->auth !== null && $ctx->auth->get_currentUser() !== null ? $ctx->auth->get_currentUser()->get_userID() : null);
         }
         $requestLog = "[" . _hx_string_or_null($ctx->request->get_httpMethod()) . " " . _hx_string_or_null($ctx->request->get_uri()) . "] from [" . _hx_string_or_null($userDetails) . "], response: [" . _hx_string_rec($ctx->response->status, "") . " " . _hx_string_or_null($ctx->response->get_contentType()) . "]";
         $messages->push($requestLog);
         $_g = 0;
         $_g1 = $ctx->messages;
         while ($_g < $_g1->length) {
             $msg = $_g1[$_g];
             ++$_g;
             $messages->push(ufront_log_ServerConsoleLogger::formatMsg($msg));
             unset($msg);
         }
         if ($appMessages !== null) {
             $_g2 = 0;
             while ($_g2 < $appMessages->length) {
                 $msg1 = $appMessages[$_g2];
                 ++$_g2;
                 $messages->push(ufront_log_ServerConsoleLogger::formatMsg($msg1));
                 unset($msg1);
             }
         }
         ufront_log_ServerConsoleLogger::writeLog($messages->join("\n  "), null);
         return ufront_core_SurpriseTools::success();
     }
 }
 public function executeResult($actionContext)
 {
     if ($this->preventFlush) {
         $actionContext->httpContext->response->preventFlush();
     }
     return ufront_core_SurpriseTools::success();
 }
 public function executeResult($actionContext)
 {
     if (null !== $this->contentType) {
         $actionContext->httpContext->response->set_contentType($this->contentType);
     }
     $actionContext->httpContext->response->write($this->content);
     return ufront_core_SurpriseTools::success();
 }
 public function responseOut($ctx)
 {
     if ($ctx->session !== null && $ctx->session->isActive()) {
         return $ctx->session->commit();
     } else {
         return ufront_core_SurpriseTools::success();
     }
 }
 public function writeToFile($newFilePath)
 {
     try {
         sys_io_File::copy($this->tmpFileName, $newFilePath);
         return ufront_core_SurpriseTools::success();
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         $data = tink_core_Outcome::Failure(tink_core_TypedError::withData(null, "Error during TmpFileUpload.writeToFile()", $e, _hx_anonymous(array("fileName" => "TmpFileUpload.hx", "lineNumber" => 95, "className" => "ufront.web.upload.TmpFileUpload", "methodName" => "writeToFile"))));
         return tink_core__Future_Future_Impl_::sync($data);
     }
 }
 public function log($context, $appMessages)
 {
     $logFile = _hx_string_or_null($context->get_contentDirectory()) . _hx_string_or_null($this->path);
     $req = $context->request;
     $res = $context->response;
     $userDetails = $req->get_clientIP();
     if ((null !== $context->session ? $context->session->get_id() : null) !== null) {
         $userDetails .= " " . _hx_string_or_null(null !== $context->session ? $context->session->get_id() : null);
     }
     if (($context->auth !== null && $context->auth->get_currentUser() !== null ? $context->auth->get_currentUser()->get_userID() : null) !== null) {
         $userDetails .= " " . _hx_string_or_null($context->auth !== null && $context->auth->get_currentUser() !== null ? $context->auth->get_currentUser()->get_userID() : null);
     }
     $content = "" . Std::string(Date::now()) . " [" . _hx_string_or_null($req->get_httpMethod()) . "] [" . _hx_string_or_null($req->get_uri()) . "] from [" . _hx_string_or_null($userDetails) . "], response: [" . _hx_string_rec($res->status, "") . " " . _hx_string_or_null($res->get_contentType()) . "]\n";
     $_g = 0;
     $_g1 = $context->messages;
     while ($_g < $_g1->length) {
         $msg = $_g1[$_g];
         ++$_g;
         $content .= "\t" . _hx_string_or_null(ufront_log_FileLogger::format($msg)) . "\n";
         unset($msg);
     }
     if ($appMessages !== null) {
         $_g2 = 0;
         while ($_g2 < $appMessages->length) {
             $msg1 = $appMessages[$_g2];
             ++$_g2;
             $content .= "\t" . _hx_string_or_null(ufront_log_FileLogger::format($msg1)) . "\n";
             unset($msg1);
         }
     }
     $path = haxe_io_Path::directory($logFile);
     $path1 = haxe_io_Path::addTrailingSlash($path);
     $_p = null;
     $parts = new _hx_array(array());
     while ($path1 !== ($_p = haxe_io_Path::directory($path1))) {
         $parts->unshift($path1);
         $path1 = $_p;
     }
     $_g3 = 0;
     while ($_g3 < $parts->length) {
         $part = $parts[$_g3];
         ++$_g3;
         if (_hx_char_code_at($part, strlen($part) - 1) !== 58 && !file_exists($part)) {
             @mkdir($part, 493);
         }
         unset($part);
     }
     $file = sys_io_File::append(_hx_string_or_null($context->get_contentDirectory()) . _hx_string_or_null($this->path), null);
     $file->writeString($content);
     $file->close();
     return ufront_core_SurpriseTools::success();
 }
 public function parseMultipart($onPart = null, $onData = null, $onEndPart = null)
 {
     $_g = $this;
     if (!$this->isMultipart()) {
         return ufront_core_SurpriseTools::success();
     }
     if ($this->_parsed) {
         throw new HException(ufront_web_HttpError::internalServerError("parseMultipart() has been called more than once.", null, _hx_anonymous(array("fileName" => "HttpRequest.hx", "lineNumber" => 93, "className" => "sys.ufront.web.context.HttpRequest", "methodName" => "parseMultipart"))));
     }
     $this->_parsed = true;
     if ($onPart === null) {
         $onPart = array(new _hx_lambda(array(&$_g, &$onData, &$onEndPart, &$onPart), "sys_ufront_web_context_HttpRequest_0"), 'execute');
     }
     if ($onData === null) {
         $onData = array(new _hx_lambda(array(&$_g, &$onData, &$onEndPart, &$onPart), "sys_ufront_web_context_HttpRequest_1"), 'execute');
     }
     if ($onEndPart === null) {
         $onEndPart = array(new _hx_lambda(array(&$_g, &$onData, &$onEndPart, &$onPart), "sys_ufront_web_context_HttpRequest_2"), 'execute');
     }
     $this->post = new haxe_ds_StringMap();
     $noParts = true;
     $isFile = false;
     $partName = null;
     $fileName = null;
     $currentContent = null;
     $callbackFutures = new _hx_array(array());
     $errors = new _hx_array(array());
     $processCallbackResult = array(new _hx_lambda(array(&$_g, &$callbackFutures, &$currentContent, &$errors, &$fileName, &$isFile, &$noParts, &$onData, &$onEndPart, &$onPart, &$partName), "sys_ufront_web_context_HttpRequest_3"), 'execute');
     $doEndOfPart = array(new _hx_lambda(array(&$_g, &$callbackFutures, &$currentContent, &$errors, &$fileName, &$isFile, &$noParts, &$onData, &$onEndPart, &$onPart, &$partName, &$processCallbackResult), "sys_ufront_web_context_HttpRequest_4"), 'execute');
     $doPart = array(new _hx_lambda(array(&$_g, &$callbackFutures, &$currentContent, &$doEndOfPart, &$errors, &$fileName, &$isFile, &$noParts, &$onData, &$onEndPart, &$onPart, &$partName, &$processCallbackResult), "sys_ufront_web_context_HttpRequest_5"), 'execute');
     $doData = array(new _hx_lambda(array(&$_g, &$callbackFutures, &$currentContent, &$doEndOfPart, &$doPart, &$errors, &$fileName, &$isFile, &$noParts, &$onData, &$onEndPart, &$onPart, &$partName, &$processCallbackResult), "sys_ufront_web_context_HttpRequest_6"), 'execute');
     try {
         sys_ufront_web_context__HttpRequest_WebOverride::parseMultipart($doPart, $doData);
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         $stack = haxe_CallStack::toString(haxe_CallStack::exceptionStack());
         $err1 = "Failed to parse multipart data: " . Std::string($e) . "\n" . _hx_string_or_null($stack);
         $errors->push($err1);
     }
     if ($noParts === false) {
         call_user_func($doEndOfPart);
     }
     if ($callbackFutures->length > 0) {
         return tink_core__Future_Future_Impl_::flatMap(tink_core__Future_Future_Impl_::ofMany($callbackFutures, null), array(new _hx_lambda(array(&$_g, &$callbackFutures, &$currentContent, &$doData, &$doEndOfPart, &$doPart, &$e, &$errors, &$fileName, &$isFile, &$noParts, &$onData, &$onEndPart, &$onPart, &$partName, &$processCallbackResult), "sys_ufront_web_context_HttpRequest_7"), 'execute'), null);
     } else {
         $data5 = tink_core_Outcome::Success(tink_core_Noise::$Noise);
         return tink_core__Future_Future_Impl_::sync($data5);
     }
 }
 public function log($httpContext, $appMessages)
 {
     if (!php_Boot::$skip_constructor) {
         if (ufront_log_RemotingLogger_0($this, $appMessages, $httpContext) && $httpContext->response->get_contentType() === "application/x-haxe-remoting") {
             $results = new _hx_array(array());
             $_g = 0;
             $_g1 = $httpContext->messages;
             while ($_g < $_g1->length) {
                 $msg = $_g1[$_g];
                 ++$_g;
                 $results->push(ufront_log_RemotingLogger::formatMessage($msg));
                 unset($msg);
             }
             if ($results->length > 0) {
                 $httpContext->response->write("\n" . _hx_string_or_null($results->join("\n")));
             }
         }
         return ufront_core_SurpriseTools::success();
     }
 }
 public function log($ctx, $appMessages)
 {
     if (!php_Boot::$skip_constructor) {
         if ($ctx->response->get_contentType() === "text/html" && !$ctx->response->isRedirect()) {
             $results = new _hx_array(array());
             $_g = 0;
             $_g1 = $ctx->messages;
             while ($_g < $_g1->length) {
                 $msg = $_g1[$_g];
                 ++$_g;
                 $results->push(ufront_log_BrowserConsoleLogger::formatMessage($msg));
                 unset($msg);
             }
             if ($results->length > 0) {
                 $script = "\n<script type=\"text/javascript\">\n" . _hx_string_or_null($results->join("\n")) . "\n</script>";
                 $newContent = ufront_web_result_CallJavascriptResult::insertScriptsBeforeBodyTag($ctx->response->getBuffer(), new _hx_array(array($script)));
                 $ctx->response->clearContent();
                 $ctx->response->write($newContent);
             }
         }
         return ufront_core_SurpriseTools::success();
     }
 }
 public function handleError($httpError, $ctx)
 {
     $callStack = "";
     $inner = null;
     if ($httpError !== null && _hx_field($httpError, "data") !== null) {
         $inner = " (" . Std::string($httpError->data) . ")";
     } else {
         $inner = "";
     }
     $ctx->messages->push(_hx_anonymous(array("msg" => "Handling error: " . Std::string($httpError) . _hx_string_or_null($inner) . " " . _hx_string_or_null($callStack), "pos" => _hx_anonymous(array("fileName" => "ErrorPageHandler.hx", "lineNumber" => 36, "className" => "ufront.web.ErrorPageHandler", "methodName" => "handleError")), "type" => ufront_log_MessageType::$MError)));
     if (!(($ctx->completion & 1 << ufront_web_context_RequestCompletion::$CRequestHandlersComplete->index) !== 0)) {
         $showStack = false;
         $ctx->response->clear();
         $ctx->response->status = $httpError->code;
         $ctx->response->set_contentType("text/html");
         $ctx->response->write($this->renderError($httpError, $showStack));
         $ctx->completion |= 1 << ufront_web_context_RequestCompletion::$CRequestHandlersComplete->index;
     }
     if (!$this->catchErrors) {
         $httpError->throwSelf();
     }
     return ufront_core_SurpriseTools::success();
 }
 public function responseOut($ctx)
 {
     if (strtolower($ctx->request->get_httpMethod()) === "post" && $ctx->request->isMultipart()) {
         $_g = 0;
         $_g1 = $this->files;
         while ($_g < $_g1->length) {
             $f = $_g1[$_g];
             ++$_g;
             $_g2 = $f->deleteTemporaryFile();
             switch ($_g2->index) {
                 case 1:
                     $e = _hx_deref($_g2)->params[0];
                     $ctx->messages->push(_hx_anonymous(array("msg" => $e, "pos" => _hx_anonymous(array("fileName" => "TmpFileUploadMiddleware.hx", "lineNumber" => 120, "className" => "ufront.web.upload.TmpFileUploadMiddleware", "methodName" => "responseOut")), "type" => ufront_log_MessageType::$MError)));
                     break;
                 default:
                     break;
             }
             unset($_g2);
             unset($f);
         }
     }
     return ufront_core_SurpriseTools::success();
 }
 static function notImplemented($p = null)
 {
     return ufront_core_SurpriseTools::asSurpriseError("FileSession is not implemented on this platform", null, $p);
 }
function ufront_api_UFAsyncApi_1(&$_g, &$args, &$callApi, &$flags, &$method, &$pos, &$remotingCallString, $e)
{
    $stack = haxe_CallStack::toString(haxe_CallStack::exceptionStack());
    $remotingError = ufront_remoting_RemotingError::RServerSideException($remotingCallString, $e, $stack);
    return ufront_core_SurpriseTools::asBadSurprise(ufront_web_HttpError::remotingError($remotingError, $pos));
}
Exemplo n.º 15
0
 public function execute()
 {
     $uriParts = $this->context->actionContext->get_uriParts();
     $this->setBaseUri($uriParts);
     $params = $this->context->request->get_params();
     $method = $this->context->request->get_httpMethod();
     $this->context->actionContext->controller = $this;
     $this->context->actionContext->action = "execute";
     try {
         if (0 === $uriParts->length) {
             $this->context->actionContext->action = "index";
             $this->context->actionContext->args = new _hx_array(array());
             $this->context->actionContext->get_uriParts()->splice(0, 0);
             $wrappingRequired = null;
             $i = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->index->wrapResult[0];
             $wrappingRequired = $i;
             $result = $this->wrapResult($this->index(), $wrappingRequired);
             $this->setContextActionResultWhenFinished($result);
             return $result;
         } else {
             if (1 === $uriParts->length && $uriParts[0] === "querystring") {
                 $this->context->actionContext->action = "queryString";
                 $this->context->actionContext->args = new _hx_array(array());
                 $this->context->actionContext->get_uriParts()->splice(0, 1);
                 $wrappingRequired1 = null;
                 $i1 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->queryString->wrapResult[0];
                 $wrappingRequired1 = $i1;
                 $result1 = $this->wrapResult($this->queryString(), $wrappingRequired1);
                 $this->setContextActionResultWhenFinished($result1);
                 return $result1;
             } else {
                 if (1 === $uriParts->length && $uriParts[0] === "poststring") {
                     $this->context->actionContext->action = "postString";
                     $this->context->actionContext->args = new _hx_array(array());
                     $this->context->actionContext->get_uriParts()->splice(0, 1);
                     $wrappingRequired2 = null;
                     $i2 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->postString->wrapResult[0];
                     $wrappingRequired2 = $i2;
                     $result2 = $this->wrapResult($this->postString(), $wrappingRequired2);
                     $this->setContextActionResultWhenFinished($result2);
                     return $result2;
                 } else {
                     if (1 === $uriParts->length && $uriParts[0] === "query") {
                         $this->context->actionContext->action = "query";
                         $this->context->actionContext->args = new _hx_array(array());
                         $this->context->actionContext->get_uriParts()->splice(0, 1);
                         $wrappingRequired3 = null;
                         $i3 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->query->wrapResult[0];
                         $wrappingRequired3 = $i3;
                         $result3 = $this->wrapResult($this->query(), $wrappingRequired3);
                         $this->setContextActionResultWhenFinished($result3);
                         return $result3;
                     } else {
                         if (1 === $uriParts->length && $uriParts[0] === "post") {
                             $this->context->actionContext->action = "post";
                             $this->context->actionContext->args = new _hx_array(array());
                             $this->context->actionContext->get_uriParts()->splice(0, 1);
                             $wrappingRequired4 = null;
                             $i4 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->post->wrapResult[0];
                             $wrappingRequired4 = $i4;
                             $result4 = $this->wrapResult($this->post(), $wrappingRequired4);
                             $this->setContextActionResultWhenFinished($result4);
                             return $result4;
                         } else {
                             if (1 === $uriParts->length && $uriParts[0] === "cookies") {
                                 $this->context->actionContext->action = "cookies";
                                 $this->context->actionContext->args = new _hx_array(array());
                                 $this->context->actionContext->get_uriParts()->splice(0, 1);
                                 $wrappingRequired5 = null;
                                 $i5 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->cookies->wrapResult[0];
                                 $wrappingRequired5 = $i5;
                                 $result5 = $this->wrapResult($this->cookies(), $wrappingRequired5);
                                 $this->setContextActionResultWhenFinished($result5);
                                 return $result5;
                             } else {
                                 if (1 === $uriParts->length && $uriParts[0] === "clientheaders") {
                                     $this->context->actionContext->action = "clientHeaders";
                                     $this->context->actionContext->args = new _hx_array(array());
                                     $this->context->actionContext->get_uriParts()->splice(0, 1);
                                     $wrappingRequired6 = null;
                                     $i6 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->clientHeaders->wrapResult[0];
                                     $wrappingRequired6 = $i6;
                                     $result6 = $this->wrapResult($this->clientHeaders(), $wrappingRequired6);
                                     $this->setContextActionResultWhenFinished($result6);
                                     return $result6;
                                 } else {
                                     if (1 === $uriParts->length && $uriParts[0] === "hostname") {
                                         $this->context->actionContext->action = "hostname";
                                         $this->context->actionContext->args = new _hx_array(array());
                                         $this->context->actionContext->get_uriParts()->splice(0, 1);
                                         $wrappingRequired7 = null;
                                         $i7 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->hostname->wrapResult[0];
                                         $wrappingRequired7 = $i7;
                                         $result7 = $this->wrapResult($this->hostname(), $wrappingRequired7);
                                         $this->setContextActionResultWhenFinished($result7);
                                         return $result7;
                                     } else {
                                         if (1 === $uriParts->length && $uriParts[0] === "clientip") {
                                             $this->context->actionContext->action = "clientIP";
                                             $this->context->actionContext->args = new _hx_array(array());
                                             $this->context->actionContext->get_uriParts()->splice(0, 1);
                                             $wrappingRequired8 = null;
                                             $i8 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->clientIP->wrapResult[0];
                                             $wrappingRequired8 = $i8;
                                             $result8 = $this->wrapResult($this->clientIP(), $wrappingRequired8);
                                             $this->setContextActionResultWhenFinished($result8);
                                             return $result8;
                                         } else {
                                             if (1 <= $uriParts->length && $uriParts[0] === "uri") {
                                                 $this->context->actionContext->action = "uri";
                                                 $this->context->actionContext->args = new _hx_array(array());
                                                 $this->context->actionContext->get_uriParts()->splice(0, 1);
                                                 $wrappingRequired9 = null;
                                                 $i9 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->uri->wrapResult[0];
                                                 $wrappingRequired9 = $i9;
                                                 $result9 = $this->wrapResult($this->uri(), $wrappingRequired9);
                                                 $this->setContextActionResultWhenFinished($result9);
                                                 return $result9;
                                             } else {
                                                 if (1 === $uriParts->length && $uriParts[0] === "httpmethod") {
                                                     $this->context->actionContext->action = "httpMethod";
                                                     $this->context->actionContext->args = new _hx_array(array());
                                                     $this->context->actionContext->get_uriParts()->splice(0, 1);
                                                     $wrappingRequired10 = null;
                                                     $i10 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->httpMethod->wrapResult[0];
                                                     $wrappingRequired10 = $i10;
                                                     $result10 = $this->wrapResult($this->httpMethod(), $wrappingRequired10);
                                                     $this->setContextActionResultWhenFinished($result10);
                                                     return $result10;
                                                 } else {
                                                     if (1 === $uriParts->length && $uriParts[0] === "scriptdirectory") {
                                                         $this->context->actionContext->action = "scriptDir";
                                                         $this->context->actionContext->args = new _hx_array(array());
                                                         $this->context->actionContext->get_uriParts()->splice(0, 1);
                                                         $wrappingRequired11 = null;
                                                         $i11 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->scriptDir->wrapResult[0];
                                                         $wrappingRequired11 = $i11;
                                                         $result11 = $this->wrapResult($this->scriptDir(), $wrappingRequired11);
                                                         $this->setContextActionResultWhenFinished($result11);
                                                         return $result11;
                                                     } else {
                                                         if (1 === $uriParts->length && $uriParts[0] === "authorization") {
                                                             $this->context->actionContext->action = "authorization";
                                                             $this->context->actionContext->args = new _hx_array(array());
                                                             $this->context->actionContext->get_uriParts()->splice(0, 1);
                                                             $wrappingRequired12 = null;
                                                             $i12 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->authorization->wrapResult[0];
                                                             $wrappingRequired12 = $i12;
                                                             $result12 = $this->wrapResult($this->authorization(), $wrappingRequired12);
                                                             $this->setContextActionResultWhenFinished($result12);
                                                             return $result12;
                                                         } else {
                                                             if (3 === $uriParts->length && $uriParts[0] === "testresponse" && strlen($uriParts[1]) > 0 && strlen($uriParts[2]) > 0) {
                                                                 $status = Std::parseInt($uriParts[1]);
                                                                 if ($status === null) {
                                                                     throw new HException(testsite_Routes_0($this, $method, $params, $status, $uriParts));
                                                                 }
                                                                 $charset = $uriParts[2];
                                                                 $_param_tmp_language = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "language");
                                                                 $_param_tmp_contentType = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "contentType");
                                                                 $_param_tmp_content = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "content");
                                                                 $_param_tmp_cookieName = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "cookieName");
                                                                 $_param_tmp_cookieVal = ufront_core__MultiValueMap_MultiValueMap_Impl_::get($params, "cookieVal");
                                                                 $args = _hx_anonymous(array("language" => $_param_tmp_language, "contentType" => $_param_tmp_contentType, "content" => $_param_tmp_content, "cookieName" => $_param_tmp_cookieName, "cookieVal" => $_param_tmp_cookieVal));
                                                                 $this->context->actionContext->action = "testResponse";
                                                                 $this->context->actionContext->args = new _hx_array(array($status, $charset, $args));
                                                                 $this->context->actionContext->get_uriParts()->splice(0, 3);
                                                                 $wrappingRequired13 = null;
                                                                 $i13 = haxe_rtti_Meta::getFields(_hx_qtype("testsite.Routes"))->testResponse->wrapResult[0];
                                                                 $wrappingRequired13 = $i13;
                                                                 $result13 = $this->wrapResult($this->testResponse($status, $charset, $args), $wrappingRequired13);
                                                                 $this->setContextActionResultWhenFinished($result13);
                                                                 return $result13;
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
         throw new HException(ufront_web_HttpError::pageNotFound(_hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 442, "className" => "testsite.Routes", "methodName" => "execute"))));
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         return ufront_core_SurpriseTools::asSurpriseError($e, "Uncaught error while executing " . Std::string($this->context->actionContext->controller) . "." . _hx_string_or_null($this->context->actionContext->action) . "()", _hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 445, "className" => "testsite.Routes", "methodName" => "execute")));
     }
 }
 static function changeSuccessToNoise($s)
 {
     return ufront_core_SurpriseTools::changeSuccessTo($s, tink_core_Noise::$Noise);
 }
 public function executeResult($actionContext)
 {
     return ufront_core_SurpriseTools::success();
 }
 public function clearMessages()
 {
     $_g1 = 0;
     $_g = $this->messages->length;
     while ($_g1 < $_g) {
         $i = $_g1++;
         $this->messages->pop();
         unset($i);
     }
     return ufront_core_SurpriseTools::success();
 }