Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 50 |
|
0.00% |
0 / 28 |
CRAP | |
0.00% |
0 / 1 |
LggrState | |
0.00% |
0 / 50 |
|
0.00% |
0 / 28 |
1056 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
2 | |||
setSearch | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
isSearch | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getSearch | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setSearchProg | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
getSearchProg | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setHostName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getHostName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setHostId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getHostId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isHost | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLevel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLevel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isLevel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setRange | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getRange | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setFromTo | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
12 | |||
isFromTo | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getFrom | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getTo | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setResultSize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getResultSize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLocalCall | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isLocalCall | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPanelOpen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isPanelOpen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | namespace Lggr; |
3 | |
4 | /** |
5 | * @brief Global object to save all current UI states into. |
6 | */ |
7 | class LggrState { |
8 | |
9 | const SESSIONNAME = 'LggrState'; |
10 | |
11 | const PAGELEN = 100; |
12 | |
13 | private $bLocalCall = false; |
14 | |
15 | private $bSearch = false; |
16 | |
17 | private $sSearch = null; |
18 | |
19 | private $sSearchProg = null; |
20 | |
21 | private $iPage = 0; |
22 | |
23 | private $sHostName = null; |
24 | |
25 | private $iHost = 0; |
26 | |
27 | private $sLevel = null; |
28 | |
29 | private $iRange = 24; |
30 | |
31 | // default 24h = today, sort of |
32 | private $bFromTo = false; |
33 | |
34 | private $tsFrom = null; |
35 | |
36 | private $tsTo = null; |
37 | |
38 | private $iResultSize = 0; |
39 | |
40 | // result size of last query |
41 | private $bPanelOpen = false; |
42 | |
43 | // constructor |
44 | function __construct() { |
45 | $this->bLocalCall = false; |
46 | $this->iPage = 0; |
47 | $this->bSearch = false; |
48 | $this->sSearch = null; |
49 | $this->bSearchProg = false; |
50 | $this->sSearchProg = null; |
51 | $this->sHostName = null; |
52 | $this->iHost = 0; |
53 | $this->sLevel = null; |
54 | $this->iRange = 24; |
55 | $this->bFromTo = false; |
56 | $this->tsFrom = null; |
57 | $this->tsTo = null; |
58 | $this->iResultSize = 0; |
59 | $this->bPanelOpen = false; |
60 | } |
61 | |
62 | public function setSearch($s) { |
63 | if (null != $s) { |
64 | $this->bSearch = true; |
65 | $this->sSearch = $s; |
66 | } |
67 | } |
68 | |
69 | public function isSearch() { |
70 | return $this->bSearch; |
71 | } |
72 | |
73 | public function getSearch() { |
74 | return $this->sSearch; |
75 | } |
76 | |
77 | public function setSearchProg($s) { |
78 | if (null != $s) { |
79 | $this->bSearch = true; |
80 | $this->sSearchProg = $s; |
81 | } // if |
82 | } |
83 | |
84 | public function getSearchProg() { |
85 | return $this->sSearchProg; |
86 | } |
87 | |
88 | public function setPage($i) { |
89 | $this->iPage = $i; |
90 | } |
91 | |
92 | public function getPage() { |
93 | return $this->iPage; |
94 | } |
95 | |
96 | public function setHostName($s) { |
97 | $this->sHostName = $s; |
98 | } |
99 | |
100 | public function getHostName() { |
101 | return $this->sHostName; |
102 | } |
103 | |
104 | public function setHostId($id) { |
105 | $this->iHost = $id; |
106 | } |
107 | |
108 | public function getHostId() { |
109 | return $this->iHost; |
110 | } |
111 | |
112 | public function isHost() { |
113 | return 0 != $this->iHost; |
114 | } |
115 | |
116 | public function setLevel($s) { |
117 | $this->sLevel = $s; |
118 | } |
119 | |
120 | public function getLevel() { |
121 | return $this->sLevel; |
122 | } |
123 | |
124 | public function isLevel() { |
125 | return null != $this->sLevel; |
126 | } |
127 | |
128 | public function setRange($i) { |
129 | $this->iRange = $i; |
130 | } |
131 | |
132 | public function getRange() { |
133 | return $this->iRange; |
134 | } |
135 | |
136 | public function setFromTo($tsFrom, $tsTo) { |
137 | if (null == $tsFrom && null == $tsTo) { |
138 | $this->bFromTo = false; |
139 | } else { |
140 | $this->bFromTo = true; |
141 | } // if |
142 | $this->tsFrom = $tsFrom; |
143 | $this->tsTo = $tsTo; |
144 | } |
145 | |
146 | public function isFromTo() { |
147 | return $this->bFromTo; |
148 | } |
149 | |
150 | public function getFrom() { |
151 | return $this->tsFrom; |
152 | } |
153 | |
154 | public function getTo() { |
155 | return $this->tsTo; |
156 | } |
157 | |
158 | public function setResultSize($i) { |
159 | $this->iResultSize = $i; |
160 | } |
161 | |
162 | public function getResultSize() { |
163 | return $this->iResultSize; |
164 | } |
165 | |
166 | public function setLocalCall($b) { |
167 | $this->bLocalCall = $b; |
168 | } |
169 | |
170 | public function isLocalCall() { |
171 | return $this->bLocalCall; |
172 | } |
173 | |
174 | public function setPanelOpen($b) { |
175 | $this->bPanelOpen = $b; |
176 | } |
177 | |
178 | public function isPanelOpen() { |
179 | return $this->bPanelOpen; |
180 | } |
181 | } // class |