Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16768 | | Comparar con el anterior | Ultima modificación | Ver Log |

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