ModuleOptions   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 119
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 10
c 2
b 1
f 0
lcom 0
cbo 1
dl 0
loc 119
ccs 0
cts 40
cp 0
rs 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getSource() 0 4 1
A setSource() 0 4 1
A getDriver() 0 4 1
A setDriver() 0 4 1
A getCache() 0 4 1
A setCache() 0 4 1
A isCacheEnabled() 0 4 1
A setCacheEnabled() 0 4 1
A getTransformers() 0 4 1
A setTransformers() 0 4 1
1
<?php
2
namespace SvImages\Options;
3
4
use Zend\Stdlib\AbstractOptions;
5
6
/**
7
 * @author Vytautas Stankus <[email protected]>
8
 * @license MIT
9
 */
10
class ModuleOptions extends AbstractOptions
11
{
12
    /**
13
     * Filesystem registered in service manager
14
     *
15
     * @var string
16
     */
17
    protected $source = '';
18
19
    /**
20
     * Cache service name registered in service manager
21
     * should implement StorageInterface
22
     *
23
     * @var string
24
     */
25
    protected $cache = '';
26
27
    /**
28
     * Image driver name ex.: gd, imagic
29
     *
30
     * @var string
31
     */
32
    protected $driver = 'gd';
33
34
    /**
35
     * Cache enabled status
36
     *
37
     * @var bool
38
     */
39
    protected $cache_enabled = false;
40
41
    /**
42
     * Config for transformers manager
43
     * this allows adding custom transformers
44
     *
45
     * @var array
46
     */
47
    protected $transformers = [];
48
49
    /**
50
     * @return string
51
     */
52
    public function getSource()
53
    {
54
        return $this->source;
55
    }
56
57
    /**
58
     * @param string $source
59
     */
60
    public function setSource($source)
61
    {
62
        $this->source = $source;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getDriver()
69
    {
70
        return $this->driver;
71
    }
72
73
    /**
74
     * @param string $driver
75
     */
76
    public function setDriver($driver)
77
    {
78
        $this->driver = $driver;
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getCache()
85
    {
86
        return $this->cache;
87
    }
88
89
    /**
90
     * @param string $cache
91
     */
92
    public function setCache($cache)
93
    {
94
        $this->cache = $cache;
95
    }
96
97
    /**
98
     * @return boolean
99
     */
100
    public function isCacheEnabled()
101
    {
102
        return $this->cache_enabled;
103
    }
104
105
    /**
106
     * @param boolean $cache_enabled
107
     */
108
    public function setCacheEnabled($cache_enabled)
109
    {
110
        $this->cache_enabled = $cache_enabled;
111
    }
112
113
    /**
114
     * @return array
115
     */
116
    public function getTransformers()
117
    {
118
        return $this->transformers;
119
    }
120
121
    /**
122
     * @param array $transformers
123
     */
124
    public function setTransformers($transformers)
125
    {
126
        $this->transformers = $transformers;
127
    }
128
}
129