2017-09-22 14:02:02 +02:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2017-09-22 14:02:02 +02:00
|
|
|
// Application config
|
|
|
|
|
|
|
|
return [
|
|
|
|
// Service providers
|
2018-08-12 00:08:52 +02:00
|
|
|
'providers' => [
|
2018-09-05 13:40:03 +02:00
|
|
|
// Application bootstrap
|
2017-10-31 13:40:13 +01:00
|
|
|
\Engelsystem\Logger\LoggerServiceProvider::class,
|
|
|
|
\Engelsystem\Exceptions\ExceptionsServiceProvider::class,
|
|
|
|
\Engelsystem\Config\ConfigServiceProvider::class,
|
2020-04-21 11:53:19 +02:00
|
|
|
\Engelsystem\Helpers\ConfigureEnvironmentServiceProvider::class,
|
2020-12-20 14:52:29 +01:00
|
|
|
\Engelsystem\Events\EventsServiceProvider::class,
|
2018-09-05 13:40:03 +02:00
|
|
|
|
|
|
|
// Request handling
|
2018-08-22 03:10:08 +02:00
|
|
|
\Engelsystem\Http\UrlGeneratorServiceProvider::class,
|
2017-10-31 13:40:13 +01:00
|
|
|
\Engelsystem\Renderer\RendererServiceProvider::class,
|
|
|
|
\Engelsystem\Database\DatabaseServiceProvider::class,
|
2017-11-01 14:47:09 +01:00
|
|
|
\Engelsystem\Http\RequestServiceProvider::class,
|
|
|
|
\Engelsystem\Http\SessionServiceProvider::class,
|
2019-07-08 01:31:59 +02:00
|
|
|
\Engelsystem\Helpers\Translation\TranslationServiceProvider::class,
|
2018-01-18 19:01:34 +01:00
|
|
|
\Engelsystem\Http\ResponseServiceProvider::class,
|
|
|
|
\Engelsystem\Http\Psr7ServiceProvider::class,
|
2018-10-08 19:30:37 +02:00
|
|
|
\Engelsystem\Helpers\AuthenticatorServiceProvider::class,
|
2021-08-10 11:19:58 +02:00
|
|
|
\Engelsystem\Helpers\AssetsServiceProvider::class,
|
2018-08-29 15:29:48 +02:00
|
|
|
\Engelsystem\Renderer\TwigServiceProvider::class,
|
2018-08-25 21:16:20 +02:00
|
|
|
\Engelsystem\Middleware\RouteDispatcherServiceProvider::class,
|
|
|
|
\Engelsystem\Middleware\RequestHandlerServiceProvider::class,
|
2018-12-28 03:28:33 +01:00
|
|
|
\Engelsystem\Middleware\SessionHandlerServiceProvider::class,
|
2019-07-09 21:43:18 +02:00
|
|
|
\Engelsystem\Http\Validation\ValidationServiceProvider::class,
|
2019-11-27 19:11:37 +01:00
|
|
|
\Engelsystem\Http\RedirectServiceProvider::class,
|
2018-09-05 13:40:03 +02:00
|
|
|
|
|
|
|
// Additional services
|
2019-07-21 02:34:52 +02:00
|
|
|
\Engelsystem\Helpers\VersionServiceProvider::class,
|
2018-09-05 13:40:03 +02:00
|
|
|
\Engelsystem\Mail\MailerServiceProvider::class,
|
2019-12-01 22:10:10 +01:00
|
|
|
\Engelsystem\Http\HttpClientServiceProvider::class,
|
2021-08-10 11:19:58 +02:00
|
|
|
\Engelsystem\Helpers\DumpServerServiceProvider::class,
|
2022-06-12 15:01:34 +02:00
|
|
|
\Engelsystem\Helpers\UuidServiceProvider::class,
|
2017-09-22 14:02:02 +02:00
|
|
|
],
|
2018-08-12 00:08:52 +02:00
|
|
|
|
|
|
|
// Application middleware
|
|
|
|
'middleware' => [
|
2018-09-05 13:40:03 +02:00
|
|
|
// Basic initialization
|
2018-08-12 00:08:52 +02:00
|
|
|
\Engelsystem\Middleware\SendResponseHandler::class,
|
|
|
|
\Engelsystem\Middleware\ExceptionHandler::class,
|
2018-09-05 13:40:03 +02:00
|
|
|
|
|
|
|
// Changes of request/response parameters
|
2018-08-28 22:23:59 +02:00
|
|
|
\Engelsystem\Middleware\SetLocale::class,
|
2023-04-30 12:29:32 +02:00
|
|
|
\Engelsystem\Middleware\ETagHandler::class,
|
2018-10-27 12:11:37 +02:00
|
|
|
\Engelsystem\Middleware\AddHeaders::class,
|
2018-09-05 13:40:03 +02:00
|
|
|
|
|
|
|
// The application code
|
2018-08-29 13:58:50 +02:00
|
|
|
\Engelsystem\Middleware\ErrorHandler::class,
|
2018-09-03 16:33:13 +02:00
|
|
|
\Engelsystem\Middleware\VerifyCsrfToken::class,
|
2018-08-25 21:16:20 +02:00
|
|
|
\Engelsystem\Middleware\RouteDispatcher::class,
|
2018-12-28 03:28:33 +01:00
|
|
|
\Engelsystem\Middleware\SessionHandler::class,
|
2018-10-08 19:30:37 +02:00
|
|
|
|
|
|
|
// Handle request
|
2018-08-25 21:16:20 +02:00
|
|
|
\Engelsystem\Middleware\RequestHandler::class,
|
2018-08-12 00:08:52 +02:00
|
|
|
],
|
2020-12-20 14:52:29 +01:00
|
|
|
|
|
|
|
// Event handlers
|
|
|
|
'event-handlers' => [
|
|
|
|
// 'event' => [
|
|
|
|
// a list of
|
|
|
|
// 'Class@method' or 'Class' (which uses @handle),
|
|
|
|
// ['Class', 'method'],
|
2022-07-31 19:17:44 +02:00
|
|
|
// callable like [$instance, 'method'] or 'function'
|
2020-12-20 14:52:29 +01:00
|
|
|
// or $function
|
|
|
|
// ]
|
2023-02-26 16:18:16 +01:00
|
|
|
|
|
|
|
'message.created' => \Engelsystem\Events\Listener\Messages::class . '@created',
|
|
|
|
|
2020-12-28 16:04:05 +01:00
|
|
|
'news.created' => \Engelsystem\Events\Listener\News::class . '@created',
|
2021-11-23 11:59:53 +01:00
|
|
|
|
|
|
|
'oauth2.login' => \Engelsystem\Events\Listener\OAuth2::class . '@login',
|
2022-07-31 19:17:44 +02:00
|
|
|
|
|
|
|
'shift.entry.deleting' => [
|
|
|
|
\Engelsystem\Events\Listener\Shift::class . '@deletedEntryCreateWorklog',
|
|
|
|
\Engelsystem\Events\Listener\Shift::class . '@deletedEntrySendEmail',
|
|
|
|
],
|
2020-12-20 14:52:29 +01:00
|
|
|
],
|
2017-09-22 14:02:02 +02:00
|
|
|
];
|