The resource you requested could not be found. It may have been moved or deleted.
* @return \mako\http\routing\Route
*/
protected function notFoundRoute(): Route
{
return new Route([], '', static function (): void
{
throw new NotFoundException;
}, 'router:404');
}
/**
* Matches and returns the appropriate route along with its parameters.
*
{
$reflection = new ReflectionMethod($callable[0], $callable[1]);
return $callable(...$this->resolveParameters($reflection->getParameters(), $parameters, $reflection->getDeclaringClass(), $callable[1]));
}
return $callable(...$this->resolveParameters((new ReflectionFunction($callable))->getParameters(), $parameters));
}
}
* @param \Closure $action Closure
* @param array $parameters Parameters
* @return \mako\http\Response
*/
protected function executeClosure(Closure $action, array $parameters): Response
{
return $this->response->setBody($this->container->call($action, $parameters));
}
/**
* Executes a controller action.
*
* @param array|string $action Controller
$action = $route->getAction();
$parameters = $route->getParameters();
if($action instanceof Closure)
{
return $this->executeClosure($action, $parameters);
}
return $this->executeController($action, $parameters);
}
/**
public function dispatch(Route $route): Response
{
$onion = new Onion($this->container, null, MiddlewareInterface::class);
$this->addMiddlewareToStack($onion, [...$this->globalMiddleware, ...$route->getMiddleware()]);
return $onion->peel(fn () => $this->executeAction($route), [$this->request, $this->response]);
}
}
protected function buildCoreClosure(object $object): Closure
{
return function (...$arguments) use ($object)
{
$callable = $object instanceof Closure ? $object : [$object, $this->method];
return $callable(...$arguments);
};
}
/**
* Builds a layer closure.
*
{
$middleware = $this->middlewareFactory($layer, $middlewareParameters);
$next = $this->buildLayerClosure($middleware, $next);
}
return $next(...$parameters);
}
}
public function dispatch(Route $route): Response
{
$onion = new Onion($this->container, null, MiddlewareInterface::class);
$this->addMiddlewareToStack($onion, [...$this->globalMiddleware, ...$route->getMiddleware()]);
return $onion->peel(fn () => $this->executeAction($route), [$this->request, $this->response]);
}
}
// Route the request
$route = $this->container->get(Router::class)->route($request);
// Dispatch the request and send the response
$this->container->get(Dispatcher::class)->dispatch($route)->send();
}
}
/**
* Require init file and run the application.
*/
include __DIR__ . '/app/init.php';
Application::start(MAKO_APPLICATION_PATH)->run();
os | Linux hbr3.nr.no 5.15.0-1039-azure #46-Ubuntu SMP Mon May 22 15:18:07 UTC 2023 x86_64 |
server time | 2024-03-29 11:29:10 UTC |
DB_USERNAME
(9) "hbrremote"
DB_PASSWORD
(7) "99hbr00"
MODE
(3) "DEV"
HTTP_ACCEPT
(3) "*/*"
HTTP_USER_AGENT
(9) "claudebot"
HTTP_HOST
(10) "hbr2.nr.no"
PATH
(70) "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
SERVER_SIGNATURE
(71) "<address>Apache/2.4.54 (Ubuntu) Server at hbr2.nr.no Port 80</address>\n"
SERVER_SOFTWARE
(22) "Apache/2.4.54 (Ubuntu)"
SERVER_NAME
(10) "hbr2.nr.no"
SERVER_ADDR
(13) "156.116.18.11"
SERVER_PORT
(2) "80"
REMOTE_ADDR
(12) "35.173.181.0"
DOCUMENT_ROOT
(9) "/var/www/"
REQUEST_SCHEME
(4) "http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
(9) "/var/www/"
SERVER_ADMIN
(19) "webmaster@localhost"
SCRIPT_FILENAME
(35) "/var/www/hbrutvikling/hbr/index.php"
REMOTE_PORT
(5) "57832"
GATEWAY_INTERFACE
(7) "CGI/1.1"
SERVER_PROTOCOL
(8) "HTTP/1.1"
REQUEST_METHOD
(3) "GET"
QUERY_STRING
""
REQUEST_URI
(123) "/hbrutvikling/hbr/index.php/annonces/jubilee/1/http//urn.nb.no/URNNBNno-nb_digiavis_aftenposten_null_null_19531024_94_493_1"
SCRIPT_NAME
(27) "/hbrutvikling/hbr/index.php"
PATH_INFO
(95) "/annonces/jubilee/1/http/urn.nb.no/URNNBNno-nb_digiavis_aftenposten_null_null_19531024_94_493_1"
PATH_TRANSLATED
(103) "/var/www/annonces/jubilee/1/http/urn.nb.no/URNNBNno-nb_digiavis_aftenposten_null_null_19531024_94_493_1"
PHP_SELF
(122) "/hbrutvikling/hbr/index.php/annonces/jubilee/1/http/urn.nb.no/URNNBNno-nb_digiavis_aftenposten_null_null_19531024_94_493_1"
REQUEST_TIME_FLOAT
1711711750.3191
REQUEST_TIME
1711711750