Front controller

A front controller is the entry point into the application. Two basic concepts of calls can be differentiated: Web requests or console requests.

Web requests

Browsing directly: HTML requests

When the website is visited, the index.php front controller is used. There might be occasions where this is also used for XHR requests.

XHR requests

Most data that is requested asynchronously is requested enters via the xhr.php front controller. The response is application specific and may contain pure json data as well as a mixture of HTML, CSS and JavaScript.

API requests

Mainly build for the outdated android application but also used in rare occasions in other modules is the xhrapp.php front controller. This should always return pure json data (well, sometimes that might as well contain HTML/CSS/JS components). It may also, controlled by the client, use a jsonp remote procedure call.

Second API

When Matthias Larisch wanted to implement token authenticated API access, a new front controller was added: api.php. This currently only supports outputting various calendar events in ICAL format.

Console requests

For running in a shell, there is the run.php front controller that just sets up a very basic environment and then calls a method in a module.




To the extent possible under law, the yunity wiki contributors have waived all copyright and related or neighboring rights to the content of the yunity wiki. More information...


You have an account but can't edit or create pages? Write us in the open chatroom or in our yunity Slack!