Completed
Push — master ( 52213e...a02c72 )
by Matthias
16s queued 11s
created

LegacyControllerOptions   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 10
lcom 1
cbo 1
dl 0
loc 74
ccs 16
cts 24
cp 0.6667
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getDocRoot() 0 4 1
A getDocRoots() 0 4 1
A getGlobals() 0 4 1
A setDocRoot() 0 7 2
A setGlobals() 0 4 1
A getIndexFiles() 0 4 1
A setIndexFiles() 0 4 1
A getPrependOutputBufferToResponse() 0 4 1
A setPrependOutputBufferToResponse() 0 4 1
1
<?php
2
3
/**
4
 * @author Matthias Glaub <[email protected]>
5
 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
 */
7
8
namespace MaglLegacyApplication\Options;
9
10
use Laminas\Stdlib\AbstractOptions;
11
12
class LegacyControllerOptions extends AbstractOptions
13
{
14
15
    private $docRoot = array('public');
16
17
    private $indexFiles = array();
18
19
    private $globals = array(
20
        'get' => true,
21
        'request' => true,
22
    );
23
24
    private $prependOutputBufferToResponse = false;
25
26 1
    public function getDocRoot()
27
    {
28 1
        return reset($this->docRoot);
29
    }
30
31 8
    public function getDocRoots()
32
    {
33 8
        return $this->docRoot;
34
    }
35
36 6
    public function getGlobals()
37
    {
38 6
        return $this->globals;
39
    }
40
41 10
    public function setDocRoot($docRoot)
42
    {
43 10
        if (!is_array($docRoot)) {
44 1
            $docRoot = array($docRoot);
45
        }
46 10
        $this->docRoot = $docRoot;
47 10
    }
48
49 9
    public function setGlobals($globals)
50
    {
51 9
        $this->globals = $globals;
52 9
    }
53
54
    /**
55
     * @return array
56
     */
57
    public function getIndexFiles()
58
    {
59
        return $this->indexFiles;
60
    }
61
62
    /**
63
     * @param array $indexFiles
64
     */
65
    public function setIndexFiles($indexFiles)
66
    {
67
        $this->indexFiles = $indexFiles;
68
    }
69
70
    /**
71
     * @return boolean
72
     */
73 2
    public function getPrependOutputBufferToResponse()
74
    {
75 2
        return $this->prependOutputBufferToResponse;
76
    }
77
78
    /**
79
     * @param boolean $prependOutputBufferToResponse
80
     */
81
    public function setPrependOutputBufferToResponse($prependOutputBufferToResponse)
82
    {
83
        $this->prependOutputBufferToResponse = $prependOutputBufferToResponse;
84
    }
85
}
86