Completed
Push — develop ( afe0ec...7c3dfe )
by
unknown
21:46 queued 13:34
created

IndexControllerFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 11 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
 * @author cbleek
8
 * @license   MIT
9
 */
10
11
namespace Geo\Factory\Controller;
12
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
use Geo\Controller\IndexController;
16
use Geo\Options\ModuleOptions;
17
18
19
class IndexControllerFactory implements FactoryInterface
20
{
21
    /**
22
     * Create controller
23
     *
24
     * @param ServiceLocatorInterface $controllerManager
25
     *
26
     * @return IndexController
27
     */
28
    public function createService(ServiceLocatorInterface $controllerManager)
29
    {
30
        /* @var \Zend\Mvc\Controller\PluginManager $controllerManager */
31
        $serviceLocator = $controllerManager->getServiceLocator();
32
33
        /* @var ModuleOptions $options  */
34
        $options = $serviceLocator->get('Geo/Options');
35
36
        $controller = new IndexController($options);
37
        return $controller;
38
    }
39
}