Proyectos de Subversion LeadersLinked - Backend

Rev

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

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