ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilias.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22use ILIAS\Data\Factory as DataFactory;
25
26if (!file_exists('../ilias.ini.php')) {
27 die('The ILIAS setup is not completed. Please run the setup routine.');
28}
29
30require_once '../vendor/composer/vendor/autoload.php';
31
33global $DIC;
34
35try {
36 require_once __DIR__ . '/../artifacts/bootstrap_default.php';
37 entry_point('ILIAS Legacy Initialisation Adapter');
38
39 $DIC->ctrl()->callBaseClass();
40} catch (ilCtrlException $e) {
41 if (defined('DEVMODE') && DEVMODE) {
42 throw $e;
43 }
44
45 $DIC->logger()->root()->error($e->getMessage());
46 $DIC->logger()->root()->error($e->getTraceAsString());
47
48 $DIC->language()->loadLanguageModule('error');
49 $df = new DataFactory();
50 $back_target = $df->link(
51 $DIC->language()->txt('error_back_to_repository'),
52 $df->uri(ILIAS_HTTP_PATH . '/ilias.php?baseClass=ilRepositoryGUI')
53 );
54
55 try {
57 $DIC->globalScreen(),
58 $DIC->language(),
59 $DIC->ui(),
60 $DIC->http()
61 )->respond(
62 $DIC->language()->txt('http_404_not_found'),
63 StatusCode::HTTP_NOT_FOUND,
64 $back_target
65 );
66 } catch (Throwable) {
68 $e,
69 StatusCode::HTTP_NOT_FOUND,
70 $DIC->language()->txt('http_404_not_found')
71 );
72 }
73}
74
75$DIC['ilBench']->save();
76$DIC['http']?->close();
Builds data types.
Definition: Factory.php:36
Responder that renders a full ILIAS error page (UI-Framework MessageBox) and sends it with the approp...
respond(string $error_message, int $status_code, ?Link $back_target=null)
Responder that sends a minimal plain-text error response without relying on any ILIAS service (no DIC...
respond(Throwable $e, int $status_code=StatusCode::HTTP_INTERNAL_SERVER_ERROR, ?string $status_message=null)
Send a minimal plain-text error response and terminate the process.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: ilias.php:33
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: result1.php:21