engelsystem/config/app.php

71 lines
2.7 KiB
PHP
Raw Normal View History

<?php
// Application config
return [
// Service providers
2018-08-12 00:08:52 +02:00
'providers' => [
// Application bootstrap
2017-10-31 13:40:13 +01:00
\Engelsystem\Logger\LoggerServiceProvider::class,
\Engelsystem\Exceptions\ExceptionsServiceProvider::class,
\Engelsystem\Config\ConfigServiceProvider::class,
\Engelsystem\Helpers\ConfigureEnvironmentServiceProvider::class,
2020-12-20 14:52:29 +01:00
\Engelsystem\Events\EventsServiceProvider::class,
// Request handling
\Engelsystem\Http\UrlGeneratorServiceProvider::class,
2017-10-31 13:40:13 +01:00
\Engelsystem\Renderer\RendererServiceProvider::class,
\Engelsystem\Database\DatabaseServiceProvider::class,
\Engelsystem\Http\RequestServiceProvider::class,
\Engelsystem\Http\SessionServiceProvider::class,
\Engelsystem\Helpers\Translation\TranslationServiceProvider::class,
\Engelsystem\Http\ResponseServiceProvider::class,
\Engelsystem\Http\Psr7ServiceProvider::class,
\Engelsystem\Helpers\AuthenticatorServiceProvider::class,
\Engelsystem\Renderer\TwigServiceProvider::class,
\Engelsystem\Middleware\RouteDispatcherServiceProvider::class,
\Engelsystem\Middleware\RequestHandlerServiceProvider::class,
\Engelsystem\Middleware\SessionHandlerServiceProvider::class,
2019-07-09 21:43:18 +02:00
\Engelsystem\Http\Validation\ValidationServiceProvider::class,
\Engelsystem\Http\RedirectServiceProvider::class,
// Additional services
\Engelsystem\Helpers\VersionServiceProvider::class,
\Engelsystem\Mail\MailerServiceProvider::class,
\Engelsystem\Http\HttpClientServiceProvider::class,
2019-10-31 19:09:30 +01:00
\Engelsystem\Helpers\DumpServerServiceProvider::class
],
2018-08-12 00:08:52 +02:00
// Application middleware
'middleware' => [
// Basic initialization
2018-08-12 00:08:52 +02:00
\Engelsystem\Middleware\SendResponseHandler::class,
\Engelsystem\Middleware\ExceptionHandler::class,
// Changes of request/response parameters
\Engelsystem\Middleware\SetLocale::class,
2018-10-27 12:11:37 +02:00
\Engelsystem\Middleware\AddHeaders::class,
// 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,
\Engelsystem\Middleware\RouteDispatcher::class,
\Engelsystem\Middleware\SessionHandler::class,
// Handle request
\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'],
// callable like [$instance, 'method] or 'function'
// or $function
// ]
2020-12-28 16:04:05 +01:00
'news.created' => \Engelsystem\Events\Listener\News::class . '@created',
2020-12-20 14:52:29 +01:00
],
];