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