2016-07-19 18:38:41 +03:00
|
|
|
<?php
|
|
|
|
use Acelaya\ZsmAnnotatedServices\Factory\V3\AnnotatedFactory;
|
|
|
|
use Doctrine\Common\Cache\Cache;
|
|
|
|
use Doctrine\ORM\EntityManager;
|
2016-07-30 14:51:52 +03:00
|
|
|
use Shlinkio\Shlink\Common\ErrorHandler;
|
2016-07-19 18:38:41 +03:00
|
|
|
use Shlinkio\Shlink\Common\Factory\CacheFactory;
|
|
|
|
use Shlinkio\Shlink\Common\Factory\EntityManagerFactory;
|
2016-07-21 16:08:46 +03:00
|
|
|
use Shlinkio\Shlink\Common\Factory\TranslatorFactory;
|
2016-07-21 17:59:27 +03:00
|
|
|
use Shlinkio\Shlink\Common\Middleware\LocaleMiddleware;
|
2016-07-20 11:13:53 +03:00
|
|
|
use Shlinkio\Shlink\Common\Service\IpLocationResolver;
|
2016-07-21 16:08:46 +03:00
|
|
|
use Shlinkio\Shlink\Common\Twig\Extension\TranslatorExtension;
|
|
|
|
use Zend\I18n\Translator\Translator;
|
2016-07-19 18:38:41 +03:00
|
|
|
use Zend\ServiceManager\Factory\InvokableFactory;
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'services' => [
|
|
|
|
'factories' => [
|
|
|
|
EntityManager::class => EntityManagerFactory::class,
|
|
|
|
GuzzleHttp\Client::class => InvokableFactory::class,
|
|
|
|
Cache::class => CacheFactory::class,
|
2016-07-20 11:13:53 +03:00
|
|
|
IpLocationResolver::class => AnnotatedFactory::class,
|
2016-07-21 16:08:46 +03:00
|
|
|
Translator::class => TranslatorFactory::class,
|
|
|
|
TranslatorExtension::class => AnnotatedFactory::class,
|
2016-07-21 17:59:27 +03:00
|
|
|
LocaleMiddleware::class => AnnotatedFactory::class,
|
2016-07-30 14:51:52 +03:00
|
|
|
|
|
|
|
ErrorHandler\ContentBasedErrorHandler::class => AnnotatedFactory::class,
|
|
|
|
ErrorHandler\ErrorHandlerManager::class => ErrorHandler\ErrorHandlerManagerFactory::class,
|
2016-07-19 18:38:41 +03:00
|
|
|
],
|
|
|
|
'aliases' => [
|
|
|
|
'em' => EntityManager::class,
|
|
|
|
'httpClient' => GuzzleHttp\Client::class,
|
2016-07-21 16:08:46 +03:00
|
|
|
'translator' => Translator::class,
|
2016-07-19 18:38:41 +03:00
|
|
|
AnnotatedFactory::CACHE_SERVICE => Cache::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
];
|