mtas-tv-backend/src/App/Service/AvatarServiceFactory.php

22 lines
526 B
PHP
Raw Normal View History

2018-04-21 15:23:06 +02:00
<?php
declare(strict_types=1);
namespace App\Service;
use Interop\Container\ContainerInterface;
use Zend\Config\Config;
use Zend\Http\Client;
class AvatarServiceFactory
{
public function __invoke(ContainerInterface $container)
{
$httpClient = $container->get(Client::class);
$cache = $container->get('service.cache');
$configArray = $container->get('config');
$config = new Config($configArray['app.config']);
return new AvatarService($httpClient, $config, $cache);
}
}