22 lines
526 B
PHP
22 lines
526 B
PHP
<?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);
|
|
}
|
|
}
|