17003 |
efrain |
1 |
<?php
|
|
|
2 |
declare(strict_types=1);
|
|
|
3 |
|
|
|
4 |
namespace LeadersLinked\Factory\Helper;
|
|
|
5 |
|
|
|
6 |
use Psr\Container\ContainerInterface;
|
|
|
7 |
use Laminas\ServiceManager\Factory\FactoryInterface;
|
|
|
8 |
use LeadersLinked\Helper\NetworkFavicoHelper;
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
class NetworkFavicoHelperFactory implements FactoryInterface
|
|
|
12 |
{
|
|
|
13 |
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
|
|
|
14 |
{
|
|
|
15 |
$db = $container->get('leaders-linked-db');
|
|
|
16 |
$config = $container->get('ServiceManager')->get('config');
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
$config = array_filter($config, function($k) {
|
|
|
20 |
return strpos($k, 'leaderslinked.') !== false;
|
|
|
21 |
}, ARRAY_FILTER_USE_KEY);
|
|
|
22 |
|
|
|
23 |
return new NetworkFavicoHelper($config, $db);
|
|
|
24 |
}
|
|
|
25 |
}
|