Completed
Pull Request — develop (#303)
by
unknown
10:41
created

FileCacheFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
namespace Organizations\Factory\Image;
10
11
use Zend\ServiceManager\FactoryInterface;
12
use Zend\ServiceManager\ServiceLocatorInterface;
13
use Organizations\Image\FileCache;
14
15
/**
16
 * @author Miroslav Fedeleš <[email protected]>
17
 * @since 0.28
18
 */
19
class FileCacheFactory implements FactoryInterface
20
{
21
    /**
22
     * {@inheritDoc}
23
     * @see \Zend\ServiceManager\FactoryInterface::createService()
24
     */
25
    public function createService(ServiceLocatorInterface $serviceLocator)
26
    {
27
        $config = $serviceLocator->get('Config')['Organizations']['ImageFileCache'];
28
        
29
        return new FileCache($config['filePath'], $config['uriPath']);
30
    }
31
}
32