Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16768 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

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