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-08-08 13:07:04 +03:00
|
|
|
use Monolog\Logger;
|
2016-08-08 12:56:19 +03:00
|
|
|
use Psr\Log\LoggerInterface;
|
2016-07-19 18:38:41 +03:00
|
|
|
use Shlinkio\Shlink\Common\Factory\CacheFactory;
|
|
|
|
use Shlinkio\Shlink\Common\Factory\EntityManagerFactory;
|
2016-08-08 12:56:19 +03:00
|
|
|
use Shlinkio\Shlink\Common\Factory\LoggerFactory;
|
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 [
|
|
|
|
|
2016-07-31 17:30:05 +03:00
|
|
|
'dependencies' => [
|
2016-07-19 18:38:41 +03:00
|
|
|
'factories' => [
|
|
|
|
EntityManager::class => EntityManagerFactory::class,
|
|
|
|
GuzzleHttp\Client::class => InvokableFactory::class,
|
|
|
|
Cache::class => CacheFactory::class,
|
2016-08-08 12:56:19 +03:00
|
|
|
'Logger_Shlink' => LoggerFactory::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
|
|
|
|
2016-08-08 12:56:19 +03:00
|
|
|
IpLocationResolver::class => AnnotatedFactory::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-08-08 12:56:19 +03:00
|
|
|
'logger' => LoggerInterface::class,
|
2016-07-19 18:38:41 +03:00
|
|
|
AnnotatedFactory::CACHE_SERVICE => Cache::class,
|
2016-08-12 19:01:09 +03:00
|
|
|
Logger::class => 'Logger_Shlink',
|
|
|
|
LoggerInterface::class => 'Logger_Shlink',
|
2016-07-19 18:38:41 +03:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
];
|