Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev Autor Línea Nro. Línea
1 www 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 Laminas\ServiceManager\Factory\FactoryInterface;
10
use LeadersLinked\Controller\InMailController;
3671 efrain 11
use Psr\Container\ContainerInterface;
6749 efrain 12
use LeadersLinked\Cache\CacheImpl;
1 www 13
 
14
 
15
class InMailControllerFactory implements FactoryInterface
16
{
17
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
18
    {
19
 
20
        $db         = $container->get('leaders-linked-db');
21
        $log        = $container->get('leaders-linked-log');
22
        $config     = $container->get('ServiceManager')->get('config');
6749 efrain 23
        $translator     = $container->get('ServiceManager')->get('MvcTranslator');
1 www 24
 
25
        $config = array_filter($config, function($k) {
26
            return strpos($k, 'leaderslinked.') !== false;
27
        }, ARRAY_FILTER_USE_KEY);
28
 
6849 efrain 29
 
6749 efrain 30
 
31
 
6849 efrain 32
        return new InMailController($db, $log, $config, $translator);
1 www 33
    }
34
}