File index.php

Last commit: Sat Mar 19 00:09:47 2022 +0100	dankert	Refactoring: Outputs are setting their content-type themself.
1 <?php 2 // Excecuting the CMS HTTP Endpoint 3 // This is both for UI and API requests. 4 5 6 require('modules/autoload.php'); // Autoloading all classes 7 8 use cms\base\Startup; 9 use cms\output\OutputFactory; 10 11 try { 12 // Starting the application 13 // - Validating the environment 14 // - Initialize all constants 15 Startup::initialize(); 16 17 } catch (ErrorException $e) { 18 // Switching to text/plain here because so there is no way to inject any HTML to the page. 19 header('Content-Type: text/plain'); 20 error_log( $e->getMessage() ); 21 echo "Sorry, startup failed"; 22 exit; 23 } 24 25 // Creates the output driver 26 // Dependent on which data format is requested by the client. 27 $output = OutputFactory::createOutput(); 28 29 $output->execute(); // Outputs the data.
Download index.php
History Sat, 19 Mar 2022 00:09:47 +0100 dankert Refactoring: Outputs are setting their content-type themself. Thu, 10 Mar 2022 13:09:06 +0100 dankert New: Remember some user inputs in the browser local storage. Wed, 2 Feb 2022 01:12:42 +0100 dankert Better support for API requests. Mon, 31 Jan 2022 00:00:48 +0100 dankert Some documentation... Sun, 30 Jan 2022 23:38:42 +0100 dankert Refactoring: Only 1 http-endpoint for both the UI and the API. Path "/api" is not available any more, all API data is served under "/". Mon, 26 Oct 2020 09:07:36 +0100 Jan Dankert Simplyfy code fragments. Fri, 23 Oct 2020 09:58:41 +0200 Jan Dankert Litte optimation for displaying errors. Sat, 26 Sep 2020 21:42:51 +0200 Jan Dankert Refactoring: The UI Actions are now in their own namespace. No need for a confusing require file. Sat, 26 Sep 2020 13:11:23 +0200 Jan Dankert Refactoring: No global variables any more. All constants are capsulated by classes. Sat, 26 Sep 2020 01:41:20 +0200 Jan Dankert Refactoring: Removing old require.php files. With class autoloading, they are not necessary any more. Sun, 23 Feb 2020 04:49:34 +0100 Jan Dankert Refactoring with Namespaces for the cms modules, part 2. Sat, 22 Feb 2020 01:58:20 +0100 Jan Dankert New: Autoloading of classes in all modules. Thu, 21 Nov 2019 23:52:14 +0100 Jan Dankert New: VariableResolver in its own class. Keeps other code more tidy. Thu, 29 Aug 2019 23:11:13 +0200 Jan Dankert Log all UI-Exceptions to Log, because in Production-Mode they will not get displayed. Wed, 28 Aug 2019 00:41:42 +0200 Jan Dankert Security: Im Production-Mode keine Exceptions anzeigen. Sat, 1 Sep 2018 02:12:40 +0200 Jan Dankert Fix: Keinen Header setzen, wenn schon Ausgabe erfolgt ist. Wed, 29 Aug 2018 22:39:00 +0200 Jan Dankert Verschönerung der Fehlermeldung im Falle eines schlimmen Fehlers. Wed, 29 Aug 2018 01:33:22 +0200 Jan Dankert Aufgeräumt: Die RenderParams werden zu beginn erzeugt und werden in den Dispatcher und die Action reingereicht. Dadurch entfällt das Durchreichen von Action/Method. Sat, 30 Dec 2017 02:32:24 +0100 Jan Dankert Schönere HTML-Serverfehlermeldung. Außerdem müssen noch an ganz vielen Stellen die HTTP-Fehler in Exceptions umgebaut werden... Sat, 30 Dec 2017 01:10:23 +0100 Jan Dankert Schreibzugriffe aus dem HTML-UI sollen die API aufrufen. Die API ist jetzt auch soweit wieder funktionsfähig. Insgesamt noch weiter aufgeräumt und nach Modulen unterteilt. Fri, 29 Dec 2017 01:35:50 +0100 Jan Dankert Großes Refactoring: Neues Modul CMS-UI. Dieses enthält sämtliche Logik für die Bedienoberfläche. TODO: Modul CMS-API. Sat, 9 Dec 2017 23:52:47 +0100 Jan Dankert This application is only available for PHP >= 5.3 Wed, 24 Oct 2012 19:43:35 +0200 Jan Dankert Auch die index.php durch den Dispatcher und eine IndexAction schicken, da hier (später) die Perspektive initialisiert wird. Sun, 6 Nov 2011 21:28:56 +0100 Jan Dankert Datei mit Start-Layout umbenannt. Wed, 30 Mar 2011 22:20:03 +0200 dankert Fix: Pfad zur Layout-Datei. Thu, 10 Feb 2011 02:13:37 +0100 dankert Views über Ajax laden, Formulare per Ajax absenden. Sat, 17 Apr 2004 00:57:36 +0200 dankert nur Aufruf do.php Mon, 29 Sep 2003 20:20:09 +0200 dankert erste Version