Completed
Push — develop ( e4c992...b72595 )
by
unknown
06:34
created

JobUrlFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
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 - 2016 Cross Solution (http://cross-solution.de)
7
 * @license   MIT
8
 * @author    [email protected]
9
 */
10
11
namespace Jobs\Factory\View\Helper;
12
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
use Jobs\View\Helper\JobUrl;
16
17
/**
18
 * Factory for JobUrl view helper
19
 *
20
 * @author Carsten Bleek <[email protected]>
21
 */
22
class JobUrlFactory implements FactoryInterface
23
{
24
25
    public function createService(ServiceLocatorInterface $serviceLocator)
26
    {
27
        $helper    = new JobUrl();
28
        $url       = $serviceLocator->get('url');
29
        $params    = $serviceLocator->get('params');
30
        $serverUrl = $serviceLocator->get('serverUrl');
31
        $helper->setUrlHelper($url)
32
            ->setParamsHelper($params)
33
            ->setServerUrlHelper($serverUrl);
34
        return $helper;
35
    }
36
}
37