ReportManagerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 11 1
1
<?php
2
3
4
namespace ConferenceTools\Tickets\Report;
5
6
7
use Zend\Mvc\Service\AbstractPluginManagerFactory;
8
use Zend\ServiceManager\Config as ServiceManagerConfig;
9
use Zend\ServiceManager\ServiceLocatorInterface;
10
11
class ReportManagerFactory extends AbstractPluginManagerFactory
12
{
13
    const PLUGIN_MANAGER_CLASS = ReportManager::class;
14
15
    public function createService(ServiceLocatorInterface $serviceLocator, $canonicalName = null, $requestedName = null)
16
    {
17
        $service = parent::createService($serviceLocator);
18
        $config = $serviceLocator->get('Config');
19
20
        $pluginManagerConfig = $config['reports'];
21
22
        $config = new ServiceManagerConfig($pluginManagerConfig);
23
        $config->configureServiceManager($service);
24
25
        return $service;
26
    }
27
}