ModuleOptions::setSlash()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Webino (http://webino.sk)
4
 *
5
 * @link        https://github.com/webino/WebinoCanonicalRedirect for the canonical source repository
6
 * @copyright   Copyright (c) 2014-2017 Webino, s. r. o. (http://webino.sk)
7
 * @author      Peter Bačinský <[email protected]>
8
 * @license     BSD-3-Clause
9
 */
10
11
namespace WebinoCanonicalRedirect\Options;
12
13
use Zend\Stdlib\AbstractOptions;
14
15
/**
16
 * WebinoCanonicalRedirect module options
17
 */
18
class ModuleOptions extends AbstractOptions
19
{
20
    /**
21
     * @var bool
22
     */
23
    protected $enabled = true;
24
25
    /**
26
     * @var bool
27
     */
28
    protected $www = false;
29
30
    /**
31
     * @var bool
32
     */
33
    protected $slash = false;
34
35
    /**
36
     * @return bool
37
     */
38
    public function isEnabled()
39
    {
40
        return $this->enabled;
41
    }
42
43
    /**
44
     * @param bool $enabled
45
     */
46
    public function setEnabled($enabled)
47
    {
48
        $this->enabled = (bool) $enabled;
49
    }
50
51
    /**
52
     * @return bool
53
     */
54
    public function useWww()
55
    {
56
        return $this->www;
57
    }
58
59
    /**
60
     * @param bool $www
61
     */
62
    public function setWww($www)
63
    {
64
        $this->www = (bool) $www;
65
    }
66
67
    /**
68
     * @return bool
69
     */
70
    public function useSlash()
71
    {
72
        return $this->slash;
73
    }
74
75
    /**
76
     * @param bool $slash
77
     */
78
    public function setSlash($slash)
79
    {
80
        $this->slash = (bool) $slash;
81
    }
82
}
83