shlink/config/autoload/services.global.php

34 lines
1.1 KiB
PHP
Raw Normal View History

2016-04-10 10:38:07 +03:00
<?php
use Shlinkio\Shlink\Common\ErrorHandler\ContentBasedErrorHandler;
use Zend\Expressive;
2016-04-10 10:38:07 +03:00
use Zend\Expressive\Container;
use Zend\Expressive\Helper;
use Zend\Expressive\Router;
use Zend\Expressive\Template;
2016-04-17 21:27:24 +03:00
use Zend\Expressive\Twig;
use Zend\ServiceManager\Factory\InvokableFactory;
2016-04-10 10:38:07 +03:00
return [
'services' => [
'factories' => [
Expressive\Application::class => Container\ApplicationFactory::class,
2016-04-10 10:38:07 +03:00
// Url helpers
2016-04-10 10:38:07 +03:00
Helper\UrlHelper::class => Helper\UrlHelperFactory::class,
Helper\ServerUrlMiddleware::class => Helper\ServerUrlMiddlewareFactory::class,
Helper\UrlHelperMiddleware::class => Helper\UrlHelperMiddlewareFactory::class,
2016-04-17 21:27:24 +03:00
Helper\ServerUrlHelper::class => InvokableFactory::class,
Router\FastRouteRouter::class => InvokableFactory::class,
2016-04-10 10:38:07 +03:00
// View
2016-04-17 21:27:24 +03:00
Template\TemplateRendererInterface::class => Twig\TwigRendererFactory::class,
2016-04-10 10:38:07 +03:00
],
2016-04-17 21:27:24 +03:00
'aliases' => [
Router\RouterInterface::class => Router\FastRouteRouter::class,
'Zend\Expressive\FinalHandler' => ContentBasedErrorHandler::class,
],
2016-04-10 10:38:07 +03:00
],
];