Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
17002 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Factory\Controller;
6
 
7
use Psr\Container\ContainerInterface;
8
use Laminas\ServiceManager\Factory\FactoryInterface;
9
use LeadersLinked\Controller\MediaFileController;
10
use LeadersLinked\Cache\CacheImpl;
11
 
12
class MediaFileControllerFactory implements FactoryInterface
13
{
14
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
15
    {
16
 
17
        $db         = $container->get('leaders-linked-db');
18
        $cache      = $container->get('leaders-linked-cache');
19
        $log        = $container->get('leaders-linked-log');
20
 
21
        $translator     = $container->get('ServiceManager')->get('MvcTranslator');
22
        $config         = $container->get('ServiceManager')->get('config');
23
 
24
 
25
        $config = array_filter($config, function($k) {
26
            return strpos($k, 'leaderslinked.') !== false;
27
        }, ARRAY_FILTER_USE_KEY);
28
 
29
 
30
 
31
 
32
        return new MediaFileController($db, $cache, $log,  $config,  $translator);
33
    }
34
}