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

FileCacheFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 6 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