Completed
Push — develop ( afe0ec...7c3dfe )
by
unknown
13:30
created

IndexControllerFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 11
rs 9.4285
cc 1
eloc 5
nc 1
nop 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
}