Completed
Pull Request — develop (#236)
by ANTHONIUS
09:12
created

IndexControllerFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 10 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
6
 * @license   MIT
7
 */
8
9
namespace Cv\Factory\Controller;
10
11
12
use Cv\Controller\IndexController;
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
16
class IndexControllerFactory implements FactoryInterface
17
{
18
    public function createService(ServiceLocatorInterface $serviceLocator)
19
    {
20
        /** @var ControllerManager $serviceLocator */
21
        $serviceLocator = $serviceLocator->getServiceLocator();
22
23
        $searchForm = $serviceLocator->get('forms')
24
            ->get('Cv/SearchForm');
25
26
        return new IndexController($searchForm);
27
    }
28
29
}