2016-07-19 18:38:41 +03:00
|
|
|
<?php
|
2017-07-22 14:41:41 +03:00
|
|
|
|
2016-07-19 18:38:41 +03:00
|
|
|
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-08-18 14:20:57 +03:00
|
|
|
use Shlinkio\Shlink\Common\Factory;
|
2016-08-18 13:21:26 +03:00
|
|
|
use Shlinkio\Shlink\Common\Image;
|
2017-07-22 14:41:41 +03:00
|
|
|
use Shlinkio\Shlink\Common\Image\ImageBuilder;
|
2016-07-21 17:59:27 +03:00
|
|
|
use Shlinkio\Shlink\Common\Middleware\LocaleMiddleware;
|
2016-08-18 11:19:33 +03:00
|
|
|
use Shlinkio\Shlink\Common\Service;
|
2017-10-12 10:40:42 +03:00
|
|
|
use Shlinkio\Shlink\Common\Template\Extension\TranslatorExtension;
|
2016-08-18 14:20:57 +03:00
|
|
|
use Symfony\Component\Filesystem\Filesystem;
|
2016-07-21 16:08:46 +03:00
|
|
|
use Zend\I18n\Translator\Translator;
|
2017-07-22 14:41:41 +03:00
|
|
|
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
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' => [
|
2016-08-18 14:20:57 +03:00
|
|
|
EntityManager::class => Factory\EntityManagerFactory::class,
|
2016-07-19 18:38:41 +03:00
|
|
|
GuzzleHttp\Client::class => InvokableFactory::class,
|
2016-08-18 14:20:57 +03:00
|
|
|
Cache::class => Factory\CacheFactory::class,
|
|
|
|
'Logger_Shlink' => Factory\LoggerFactory::class,
|
2017-07-22 14:41:41 +03:00
|
|
|
Filesystem::class => InvokableFactory::class,
|
2016-08-08 12:56:19 +03:00
|
|
|
|
2016-08-18 14:20:57 +03:00
|
|
|
Translator::class => Factory\TranslatorFactory::class,
|
2017-07-22 14:41:41 +03:00
|
|
|
TranslatorExtension::class => ConfigAbstractFactory::class,
|
|
|
|
LocaleMiddleware::class => ConfigAbstractFactory::class,
|
2016-07-30 14:51:52 +03:00
|
|
|
|
2016-08-18 13:21:26 +03:00
|
|
|
Image\ImageBuilder::class => Image\ImageBuilderFactory::class,
|
|
|
|
|
2017-07-22 14:41:41 +03:00
|
|
|
Service\IpLocationResolver::class => ConfigAbstractFactory::class,
|
|
|
|
Service\PreviewGenerator::class => ConfigAbstractFactory::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-08-12 19:01:09 +03:00
|
|
|
Logger::class => 'Logger_Shlink',
|
|
|
|
LoggerInterface::class => 'Logger_Shlink',
|
2016-07-19 18:38:41 +03:00
|
|
|
],
|
2017-07-22 14:33:32 +03:00
|
|
|
'abstract_factories' => [
|
|
|
|
Factory\DottedAccessConfigAbstractFactory::class,
|
|
|
|
],
|
2016-07-19 18:38:41 +03:00
|
|
|
],
|
|
|
|
|
2017-07-22 14:41:41 +03:00
|
|
|
ConfigAbstractFactory::class => [
|
|
|
|
TranslatorExtension::class => ['translator'],
|
|
|
|
LocaleMiddleware::class => ['translator'],
|
|
|
|
Service\IpLocationResolver::class => ['httpClient'],
|
|
|
|
Service\PreviewGenerator::class => [
|
|
|
|
ImageBuilder::class,
|
|
|
|
Filesystem::class,
|
|
|
|
'config.preview_generation.files_location',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2016-07-19 18:38:41 +03:00
|
|
|
];
|