2017-07-31 15:50:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Service;
|
|
|
|
|
|
|
|
|
|
use Interop\Container\ContainerInterface;
|
|
|
|
|
use Zend\Config\Config;
|
2018-04-17 11:27:16 +02:00
|
|
|
use Zend\Expressive\Router\RouterInterface;
|
2017-07-31 15:50:48 +02:00
|
|
|
use Zend\Http\Client;
|
|
|
|
|
|
2017-08-18 15:49:19 +02:00
|
|
|
class JiraCollectorServiceFactory
|
2017-07-31 15:50:48 +02:00
|
|
|
{
|
|
|
|
|
public function __invoke(ContainerInterface $container)
|
|
|
|
|
{
|
2017-09-08 15:31:21 +02:00
|
|
|
$cache = $container->get('service.cache');
|
2017-07-31 15:50:48 +02:00
|
|
|
$configArray = $container->get('config');
|
2017-08-14 15:09:27 +02:00
|
|
|
$httpClient = $container->get(Client::class);
|
2017-07-31 15:50:48 +02:00
|
|
|
$config = new Config($configArray['app.config']);
|
2018-04-17 11:27:16 +02:00
|
|
|
$router = $container->get(RouterInterface::class);
|
|
|
|
|
return new JiraCollectorService($cache,$httpClient, $config, $router);
|
2017-07-31 15:50:48 +02:00
|
|
|
}
|
|
|
|
|
}
|