Completed
Pull Request — develop (#303)
by
unknown
08:23
created

ImageFileCacheOptions   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getEnabled() 0 4 1
A setEnabled() 0 5 1
A getFilePath() 0 4 1
A setFilePath() 0 5 1
A getUriPath() 0 4 1
A setUriPath() 0 5 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\Options;
10
11
use Zend\Stdlib\AbstractOptions;
12
13
/**
14
 * Image file cache options
15
 *
16
 * @author Miroslav Fedeleš <[email protected]>
17
 * @since 0.28
18
 */
19
class ImageFileCacheOptions extends AbstractOptions
20
{
21
22
    /**
23
     * Flag whether cache is enabled
24
     *
25
     * @var bool
26
     */
27
    protected $enabled = true;
28
    
29
    /**
30
     * Path to the directory in a file system
31
     *
32
     * @var string
33
     */
34
    protected $filePath;
35
    
36
    /**
37
     * Path to the directory accessible via web server
38
     *
39
     * @var string
40
     */
41
    protected $uriPath = '/static/Organizations/Image';
42
    
43
    /**
44
     * @param array|Traversable|null $options
45
     */
46
    public function __construct($options = null)
47
    {
48
        $this->filePath = __DIR__ . '/../../../../../public' . $this->uriPath;
49
        
50
        parent::__construct($options);
51
    }
52
53
    /**
54
     * @return bool
55
     */
56
    public function getEnabled()
0 ignored issues
show
Coding Style introduced by
function getEnabled() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
57
    {
58
        return $this->enabled;
59
    }
60
61
    /**
62
     * @param bool $enabled
63
     * @return ImageFileCacheOptions
64
     */
65
    public function setEnabled($enabled)
66
    {
67
        $this->enabled = $enabled;
68
        return $this;
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getFilePath()
75
    {
76
        return $this->filePath;
77
    }
78
79
    /**
80
     * @param string $filePath
81
     * @return ImageFileCacheOptions
82
     */
83
    public function setFilePath($filePath)
84
    {
85
        $this->filePath = $filePath;
86
        return $this;
87
    }
88
89
    /**
90
     * @return string
91
     */
92
    public function getUriPath()
93
    {
94
        return $this->uriPath;
95
    }
96
97
    /**
98
     * @param string $uriPath
99
     * @return ImageFileCacheOptions
100
     */
101
    public function setUriPath($uriPath)
102
    {
103
        $this->uriPath = $uriPath;
104
        return $this;
105
    }
106
}
107