58 $http = $this->context->http();
59 $ctrl = $this->context->refinery();
61 $request = $this->request_builder->buildRequest(
63 $this->context->refinery(),
66 if (!$request instanceof
Request) {
67 throw new \RuntimeException(
'No request could be built');
70 $handler = $this->handlers[$request->getNamespace()] ??
null;
72 throw new \InvalidArgumentException(
'No handler found for namespace ' . $request->getNamespace());
75 if (!$response->targetCanBeReached()) {
76 throw new \RuntimeException(
77 'Handler ' .
$handler->getNamespace() .
' did not return a URI' 83 $response instanceof MaybeCanHandlerAfterLogin
84 || (!$this->context->isUserLoggedIn() && !$this->context->isPublicSectionActive())
86 $uri_builder =
new StandardURIBuilder(ILIAS_HTTP_PATH,
false);
87 $target = $uri_builder->buildTarget(
88 $request->getNamespace(),
89 $request->getReferenceId(),
90 $request->getAdditionalParameters()
92 $full_uri = $base_uri .
"/login.php?target=";
93 $full_uri .= str_replace(
'/',
'_', rtrim($target,
'/'));
94 $full_uri .=
'&cmd=force_login&lang=' . $this->context->getUserLanguage();
98 $uri_path = $response->getURIPath() ??
'';
99 $base_path = $base_uri->getPath() ??
'';
100 $uri_path = str_replace($base_path,
'', $uri_path);
101 $full_uri = $base_uri .
'/' . trim((
string) $uri_path,
'/');
105 $http->response()->withAddedHeader(
'Location', $full_uri)
107 $http->sendResponse();
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
appendUnknownParameters(Context $context, string $full_uri)