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

JobUrlFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

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