Completed
Push — 1.x ( 6e286e...c7aa89 )
by Daniel
45:22 queued 35:25
created

ModuleOptions::createService()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 5
rs 9.4286
cc 2
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Clayton Daley
5
 * Date: 5/6/2015
6
 * Time: 6:39 PM
7
 */
8
9
namespace ZfcUser\Factory\Options;
10
11
12
use Zend\ServiceManager\FactoryInterface;
13
use Zend\ServiceManager\ServiceLocatorInterface;
14
use ZfcUser\Options;
15
16
class ModuleOptions implements FactoryInterface
17
{
18
19
    /**
20
     * Create service
21
     *
22
     * @param ServiceLocatorInterface $serviceLocator
23
     * @return mixed
24
     */
25
    public function createService(ServiceLocatorInterface $serviceLocator)
26
    {
27
        $config = $serviceLocator->get('Config');
28
        return new Options\ModuleOptions(isset($config['zfcuser']) ? $config['zfcuser'] : array());
29
    }
30
}
31