@@ -218,6 +218,9 @@ discard block |
||
218 | 218 | return $this->setFooterCommon(implode('', $sReturn)); |
219 | 219 | } |
220 | 220 | |
221 | + /** |
|
222 | + * @param \Symfony\Component\HttpFoundation\Request $superGlobals |
|
223 | + */ |
|
221 | 224 | private function setFormCurlInfos($superGlobals) |
222 | 225 | { |
223 | 226 | $source = $this->localConfiguration['info']; |
@@ -227,6 +230,9 @@ discard block |
||
227 | 230 | . '</div><!--from tabCurl-->'; |
228 | 231 | } |
229 | 232 | |
233 | + /** |
|
234 | + * @param \Symfony\Component\HttpFoundation\Request $superGlobals |
|
235 | + */ |
|
230 | 236 | private function setFormInfos($superGlobals) |
231 | 237 | { |
232 | 238 | $source = $this->localConfiguration['response']; |
@@ -74,20 +74,20 @@ discard block |
||
74 | 74 | if ((!is_array($firstArray)) || (!is_array($secondArray))) { |
75 | 75 | return ''; |
76 | 76 | } |
77 | - $firstRow = $this->mergeArraysIntoFirstSecond($firstArray, $secondArray, ['first', 'second']); |
|
78 | - $secondRow = $this->mergeArraysIntoFirstSecond($secondArray, $firstArray, ['second', 'first']); |
|
77 | + $firstRow = $this->mergeArraysIntoFirstSecond($firstArray, $secondArray, [ 'first', 'second' ]); |
|
78 | + $secondRow = $this->mergeArraysIntoFirstSecond($secondArray, $firstArray, [ 'second', 'first' ]); |
|
79 | 79 | $row = array_merge($firstRow, $secondRow); |
80 | 80 | ksort($row); |
81 | - $urlArguments = '?Label=' . $_GET['Label']; |
|
82 | - $sString[] = '<table style="width:100%">' |
|
81 | + $urlArguments = '?Label=' . $_GET[ 'Label' ]; |
|
82 | + $sString[ ] = '<table style="width:100%">' |
|
83 | 83 | . '<thead><tr>' |
84 | 84 | . '<th>Identifier</th>' |
85 | - . '<th><a href="' . $this->config['Servers'][$_GET['localConfig']]['url'] |
|
85 | + . '<th><a href="' . $this->config[ 'Servers' ][ $_GET[ 'localConfig' ] ][ 'url' ] |
|
86 | 86 | . $urlArguments . '" target="_blank">' |
87 | - . $this->config['Servers'][$_GET['localConfig']]['name'] . '</a></th>' |
|
88 | - . '<th><a href="' . $this->config['Servers'][$_GET['serverConfig']]['url'] |
|
87 | + . $this->config[ 'Servers' ][ $_GET[ 'localConfig' ] ][ 'name' ] . '</a></th>' |
|
88 | + . '<th><a href="' . $this->config[ 'Servers' ][ $_GET[ 'serverConfig' ] ][ 'url' ] |
|
89 | 89 | . $urlArguments . '" target="_blank">' |
90 | - . $this->config['Servers'][$_GET['serverConfig']]['name'] . '</a></th>' |
|
90 | + . $this->config[ 'Servers' ][ $_GET[ 'serverConfig' ] ][ 'name' ] . '</a></th>' |
|
91 | 91 | . '</tr></thead>' |
92 | 92 | . '<tbody>'; |
93 | 93 | if ($superGlobals->get('displayOnlyDifferent') == '1') { |
@@ -97,39 +97,39 @@ discard block |
||
97 | 97 | } |
98 | 98 | foreach ($row as $key => $value) { |
99 | 99 | $rowString = '<tr><td style="width:20%;">' . $key . '</td><td style="width:40%;">' |
100 | - . str_replace(',', ', ', $value['first']) . '</td><td style="width:40%;">' |
|
101 | - . str_replace(',', ', ', $value['second']) . '</td></tr>'; |
|
100 | + . str_replace(',', ', ', $value[ 'first' ]) . '</td><td style="width:40%;">' |
|
101 | + . str_replace(',', ', ', $value[ 'second' ]) . '</td></tr>'; |
|
102 | 102 | if ($displayOnlyDifferent) { |
103 | - if ($value['first'] != $value['second']) { |
|
104 | - $sString[] = $rowString; |
|
103 | + if ($value[ 'first' ] != $value[ 'second' ]) { |
|
104 | + $sString[ ] = $rowString; |
|
105 | 105 | } |
106 | 106 | } else { |
107 | - $sString[] = $rowString; |
|
107 | + $sString[ ] = $rowString; |
|
108 | 108 | } |
109 | 109 | } |
110 | - $sString[] = '</tbody></table>'; |
|
110 | + $sString[ ] = '</tbody></table>'; |
|
111 | 111 | return implode('', $sString); |
112 | 112 | } |
113 | 113 | |
114 | 114 | private function getConfiguration() |
115 | 115 | { |
116 | 116 | $strdConfig = $this->configuredDeployedInformators(); |
117 | - foreach ($strdConfig['informators'] as $key => $value) { |
|
118 | - $this->config['Servers'][] = [ |
|
117 | + foreach ($strdConfig[ 'informators' ] as $key => $value) { |
|
118 | + $this->config[ 'Servers' ][ ] = [ |
|
119 | 119 | 'name' => $key, |
120 | 120 | 'url' => $value, |
121 | 121 | ]; |
122 | 122 | } |
123 | - $haystack = array_keys($strdConfig['informators']); |
|
124 | - $this->config['Defaults']['Label'] = $strdConfig['default']['label']; |
|
125 | - $this->config['Defaults']['localConfig'] = array_search($strdConfig['default']['source'], $haystack); |
|
126 | - $this->config['Defaults']['serverConfig'] = array_search($strdConfig['default']['target'], $haystack); |
|
127 | - $this->config['Defaults']['displayOnlyDifferent'] = $strdConfig['default']['typeOfResults']; |
|
123 | + $haystack = array_keys($strdConfig[ 'informators' ]); |
|
124 | + $this->config[ 'Defaults' ][ 'Label' ] = $strdConfig[ 'default' ][ 'label' ]; |
|
125 | + $this->config[ 'Defaults' ][ 'localConfig' ] = array_search($strdConfig[ 'default' ][ 'source' ], $haystack); |
|
126 | + $this->config[ 'Defaults' ][ 'serverConfig' ] = array_search($strdConfig[ 'default' ][ 'target' ], $haystack); |
|
127 | + $this->config[ 'Defaults' ][ 'displayOnlyDifferent' ] = $strdConfig[ 'default' ][ 'typeOfResults' ]; |
|
128 | 128 | } |
129 | 129 | |
130 | - private function mergeArraysIntoFirstSecond($firstArray, $secondArray, $pSequence = ['first', 'second']) |
|
130 | + private function mergeArraysIntoFirstSecond($firstArray, $secondArray, $pSequence = [ 'first', 'second' ]) |
|
131 | 131 | { |
132 | - $row = []; |
|
132 | + $row = [ ]; |
|
133 | 133 | foreach ($firstArray as $key => $value) { |
134 | 134 | if (is_array($value)) { |
135 | 135 | foreach ($value as $key2 => $value2) { |
@@ -138,39 +138,39 @@ discard block |
||
138 | 138 | if (is_array($value3)) { |
139 | 139 | foreach ($value3 as $key4 => $value4) { |
140 | 140 | $keyCrt = $key . '_' . $key2 . '__' . $key3 . '__' . $key4; |
141 | - $row[$keyCrt][$pSequence[0]] = $value4; |
|
142 | - if (isset($secondArray[$key][$key2][$key3][$key4])) { |
|
143 | - $row[$keyCrt][$pSequence[1]] = $secondArray[$key][$key2][$key3][$key4]; |
|
141 | + $row[ $keyCrt ][ $pSequence[ 0 ] ] = $value4; |
|
142 | + if (isset($secondArray[ $key ][ $key2 ][ $key3 ][ $key4 ])) { |
|
143 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = $secondArray[ $key ][ $key2 ][ $key3 ][ $key4 ]; |
|
144 | 144 | } else { |
145 | - $row[$keyCrt][$pSequence[1]] = ''; |
|
145 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = ''; |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | } else { |
149 | 149 | $keyCrt = $key . '_' . $key2 . '__' . $key3; |
150 | - $row[$keyCrt][$pSequence[0]] = $value3; |
|
151 | - if (isset($secondArray[$key][$key2][$key3])) { |
|
152 | - $row[$keyCrt][$pSequence[1]] = $secondArray[$key][$key2][$key3]; |
|
150 | + $row[ $keyCrt ][ $pSequence[ 0 ] ] = $value3; |
|
151 | + if (isset($secondArray[ $key ][ $key2 ][ $key3 ])) { |
|
152 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = $secondArray[ $key ][ $key2 ][ $key3 ]; |
|
153 | 153 | } else { |
154 | - $row[$keyCrt][$pSequence[1]] = ''; |
|
154 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = ''; |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 | } |
158 | 158 | } else { |
159 | 159 | $keyCrt = $key . '_' . $key2; |
160 | - $row[$keyCrt][$pSequence[0]] = $value2; |
|
161 | - if (isset($secondArray[$key][$key2])) { |
|
162 | - $row[$keyCrt][$pSequence[1]] = $secondArray[$key][$key2]; |
|
160 | + $row[ $keyCrt ][ $pSequence[ 0 ] ] = $value2; |
|
161 | + if (isset($secondArray[ $key ][ $key2 ])) { |
|
162 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = $secondArray[ $key ][ $key2 ]; |
|
163 | 163 | } else { |
164 | - $row[$keyCrt][$pSequence[1]] = ''; |
|
164 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = ''; |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | } |
168 | 168 | } else { |
169 | - $row[$key][$pSequence[0]] = $value; |
|
170 | - if (isset($secondArray[$key])) { |
|
171 | - $row[$key][$pSequence[1]] = $secondArray[$key]; |
|
169 | + $row[ $key ][ $pSequence[ 0 ] ] = $value; |
|
170 | + if (isset($secondArray[ $key ])) { |
|
171 | + $row[ $key ][ $pSequence[ 1 ] ] = $secondArray[ $key ]; |
|
172 | 172 | } else { |
173 | - $row[$key][$pSequence[1]] = ''; |
|
173 | + $row[ $key ][ $pSequence[ 1 ] ] = ''; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | } |
@@ -179,38 +179,38 @@ discard block |
||
179 | 179 | |
180 | 180 | private function prepareForOutputForm($inArray) |
181 | 181 | { |
182 | - $urlToGetLbl = $this->config['Servers'][$this->config['Defaults']['localConfig']]['url'] |
|
182 | + $urlToGetLbl = $this->config[ 'Servers' ][ $this->config[ 'Defaults' ][ 'localConfig' ] ][ 'url' ] |
|
183 | 183 | . '?Label=---' . urlencode(' List of known labels'); |
184 | - $knownLabels = $this->getContentFromUrlThroughCurlAsArrayIfJson($urlToGetLbl)['response']; |
|
184 | + $knownLabels = $this->getContentFromUrlThroughCurlAsArrayIfJson($urlToGetLbl)[ 'response' ]; |
|
185 | 185 | echo $this->setFormOptions([ |
186 | - 'Defaults' => $this->config['Defaults'], |
|
186 | + 'Defaults' => $this->config[ 'Defaults' ], |
|
187 | 187 | 'KnownLabels' => $knownLabels, |
188 | - 'Servers' => $this->config['Servers'], |
|
189 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
188 | + 'Servers' => $this->config[ 'Servers' ], |
|
189 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
190 | 190 | ]); |
191 | 191 | } |
192 | 192 | |
193 | 193 | private function processInfos() |
194 | 194 | { |
195 | - if (isset($_GET['localConfig']) && isset($_GET['serverConfig'])) { |
|
196 | - $urlArguments = '?Label=' . urlencode($_GET['Label']); |
|
197 | - $source = $this->config['Servers'][$_GET['localConfig']]['url'] . $urlArguments; |
|
195 | + if (isset($_GET[ 'localConfig' ]) && isset($_GET[ 'serverConfig' ])) { |
|
196 | + $urlArguments = '?Label=' . urlencode($_GET[ 'Label' ]); |
|
197 | + $source = $this->config[ 'Servers' ][ $_GET[ 'localConfig' ] ][ 'url' ] . $urlArguments; |
|
198 | 198 | $this->localConfiguration = $this->getContentFromUrlThroughCurlAsArrayIfJson($source); |
199 | - $destination = $this->config['Servers'][$_GET['serverConfig']]['url'] . $urlArguments; |
|
199 | + $destination = $this->config[ 'Servers' ][ $_GET[ 'serverConfig' ] ][ 'url' ] . $urlArguments; |
|
200 | 200 | $this->serverConfiguration = $this->getContentFromUrlThroughCurlAsArrayIfJson($destination); |
201 | 201 | } else { |
202 | - $this->localConfiguration = ['response' => '', 'info' => '']; |
|
203 | - $this->serverConfiguration = ['response' => '', 'info' => '']; |
|
202 | + $this->localConfiguration = [ 'response' => '', 'info' => '' ]; |
|
203 | + $this->serverConfiguration = [ 'response' => '', 'info' => '' ]; |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
207 | 207 | private function setFooterHtml() |
208 | 208 | { |
209 | - $sReturn = []; |
|
210 | - $sReturn[] = '</div><!-- from main Tabber -->'; |
|
211 | - $sReturn[] = '<div class="resetOnly author">© 2015 Daniel Popiniuc</div>'; |
|
212 | - $sReturn[] = '<hr/>'; |
|
213 | - $sReturn[] = '<div class="disclaimer">' |
|
209 | + $sReturn = [ ]; |
|
210 | + $sReturn[ ] = '</div><!-- from main Tabber -->'; |
|
211 | + $sReturn[ ] = '<div class="resetOnly author">© 2015 Daniel Popiniuc</div>'; |
|
212 | + $sReturn[ ] = '<hr/>'; |
|
213 | + $sReturn[ ] = '<div class="disclaimer">' |
|
214 | 214 | . 'The developer cannot be liable of any data input or results, ' |
215 | 215 | . 'included but not limited to any implication of these ' |
216 | 216 | . '(anywhere and whomever there might be these)!' |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | |
221 | 221 | private function setFormCurlInfos($superGlobals) |
222 | 222 | { |
223 | - $source = $this->localConfiguration['info']; |
|
224 | - $destination = $this->serverConfiguration['info']; |
|
223 | + $source = $this->localConfiguration[ 'info' ]; |
|
224 | + $destination = $this->serverConfiguration[ 'info' ]; |
|
225 | 225 | return '<div class="tabbertab" id="tabCurl" title="CURL infos">' |
226 | 226 | . $this->displayTableFromMultiLevelArray($source, $destination, $superGlobals) |
227 | 227 | . '</div><!--from tabCurl-->'; |
@@ -229,10 +229,10 @@ discard block |
||
229 | 229 | |
230 | 230 | private function setFormInfos($superGlobals) |
231 | 231 | { |
232 | - $source = $this->localConfiguration['response']; |
|
233 | - $destination = $this->serverConfiguration['response']; |
|
232 | + $source = $this->localConfiguration[ 'response' ]; |
|
233 | + $destination = $this->serverConfiguration[ 'response' ]; |
|
234 | 234 | return '<div class="tabbertab' |
235 | - . (isset($_GET['Label']) ? ' tabbertabdefault' : '') |
|
235 | + . (isset($_GET[ 'Label' ]) ? ' tabbertabdefault' : '') |
|
236 | 236 | . '" id="tabConfigs" title="Informations">' |
237 | 237 | . $this->displayTableFromMultiLevelArray($source, $destination, $superGlobals) |
238 | 238 | . '</div><!--from tabConfigs-->'; |
@@ -242,12 +242,12 @@ discard block |
||
242 | 242 | { |
243 | 243 | return $this->setHeaderCommon([ |
244 | 244 | 'lang' => 'en-US', |
245 | - 'title' => $this->applicationFlags['name'], |
|
245 | + 'title' => $this->applicationFlags[ 'name' ], |
|
246 | 246 | 'css' => 'css/main.css', |
247 | 247 | 'javascript' => 'js/tabber.min.js', |
248 | 248 | ]) |
249 | 249 | . $this->setJavascriptContent('document.write(\'<style type="text/css">.tabber{display:none;}</style>\');') |
250 | - . '<h1>' . $this->applicationFlags['name'] . '</h1>' |
|
250 | + . '<h1>' . $this->applicationFlags[ 'name' ] . '</h1>' |
|
251 | 251 | . '<div class="tabber" id="tab">'; |
252 | 252 | } |
253 | 253 | } |
@@ -31,15 +31,15 @@ discard block |
||
31 | 31 | |
32 | 32 | private function listOfKnownLabels($inArray) |
33 | 33 | { |
34 | - $informatorKnownLabels = array_diff($inArray['KnownLabels'], ['--- List of known labels']); |
|
35 | - $tmpOptions = []; |
|
34 | + $informatorKnownLabels = array_diff($inArray[ 'KnownLabels' ], [ '--- List of known labels' ]); |
|
35 | + $tmpOptions = [ ]; |
|
36 | 36 | foreach ($informatorKnownLabels as $value) { |
37 | - $tmpOptions[] = '<input type="radio" name="Label" id="Label_' . $value . '" value="' . $value . '" ' |
|
37 | + $tmpOptions[ ] = '<input type="radio" name="Label" id="Label_' . $value . '" value="' . $value . '" ' |
|
38 | 38 | . $this->turnRequestedValueIntoCheckboxStatus([ |
39 | 39 | 'CheckedValue' => $value, |
40 | - 'Defaults' => $inArray['Defaults'], |
|
40 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
41 | 41 | 'RequestedName' => 'Label', |
42 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
42 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
43 | 43 | ]) |
44 | 44 | . '/>' |
45 | 45 | . '<label for="Label_' . $value . '">' . $value . '</label>'; |
@@ -52,56 +52,56 @@ discard block |
||
52 | 52 | |
53 | 53 | private function providers($inArray) |
54 | 54 | { |
55 | - $tmpOptions = []; |
|
56 | - foreach ($inArray['Servers'] as $key => $value) { |
|
57 | - $tmpOptions[] = '<a href="' . $value['url'] . '" target="_blank">run-me</a> ' |
|
58 | - . '<input type="radio" name="' . $inArray['ConfigName'] . '" id="' |
|
59 | - . $inArray['ConfigName'] . '_' . $key . '" value="' . $key . '" ' |
|
55 | + $tmpOptions = [ ]; |
|
56 | + foreach ($inArray[ 'Servers' ] as $key => $value) { |
|
57 | + $tmpOptions[ ] = '<a href="' . $value[ 'url' ] . '" target="_blank">run-me</a> ' |
|
58 | + . '<input type="radio" name="' . $inArray[ 'ConfigName' ] . '" id="' |
|
59 | + . $inArray[ 'ConfigName' ] . '_' . $key . '" value="' . $key . '" ' |
|
60 | 60 | . $this->turnRequestedValueIntoCheckboxStatus([ |
61 | 61 | 'CheckedValue' => (string) $key, |
62 | - 'Defaults' => $inArray['Defaults'], |
|
63 | - 'RequestedName' => $inArray['ConfigName'], |
|
64 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
62 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
63 | + 'RequestedName' => $inArray[ 'ConfigName' ], |
|
64 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
65 | 65 | ]) |
66 | 66 | . '/>' |
67 | - . '<label for="' . $inArray['ConfigName'] . '_' . $key . '">' . $value['name'] . '</label>'; |
|
67 | + . '<label for="' . $inArray[ 'ConfigName' ] . '_' . $key . '">' . $value[ 'name' ] . '</label>'; |
|
68 | 68 | } |
69 | 69 | return '<fieldset style="float:left;">' |
70 | - . '<legend>' . $inArray['TitleStart'] . ' config providers</legend>' |
|
70 | + . '<legend>' . $inArray[ 'TitleStart' ] . ' config providers</legend>' |
|
71 | 71 | . implode('<br/>', $tmpOptions) |
72 | 72 | . '</fieldset>'; |
73 | 73 | } |
74 | 74 | |
75 | 75 | protected function setFormOptions($inArray) |
76 | 76 | { |
77 | - $sReturn = []; |
|
78 | - $sReturn[] = $this->typeOfResults([ |
|
79 | - 'Defaults' => $inArray['Defaults'], |
|
80 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
77 | + $sReturn = [ ]; |
|
78 | + $sReturn[ ] = $this->typeOfResults([ |
|
79 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
80 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
81 | 81 | ]); |
82 | - $sReturn[] = $this->providers([ |
|
82 | + $sReturn[ ] = $this->providers([ |
|
83 | 83 | 'ConfigName' => 'localConfig', |
84 | - 'Defaults' => $inArray['Defaults'], |
|
85 | - 'Servers' => $inArray['Servers'], |
|
86 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
84 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
85 | + 'Servers' => $inArray[ 'Servers' ], |
|
86 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
87 | 87 | 'TitleStart' => 'Source', |
88 | 88 | ]); |
89 | - $sReturn[] = $this->providers([ |
|
89 | + $sReturn[ ] = $this->providers([ |
|
90 | 90 | 'ConfigName' => 'serverConfig', |
91 | - 'Defaults' => $inArray['Defaults'], |
|
92 | - 'Servers' => $inArray['Servers'], |
|
93 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
91 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
92 | + 'Servers' => $inArray[ 'Servers' ], |
|
93 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
94 | 94 | 'TitleStart' => 'Target', |
95 | 95 | ]); |
96 | - $sReturn[] = $this->listOfKnownLabels([ |
|
97 | - 'Defaults' => $inArray['Defaults'], |
|
98 | - 'KnownLabels' => $inArray['KnownLabels'], |
|
99 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
96 | + $sReturn[ ] = $this->listOfKnownLabels([ |
|
97 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
98 | + 'KnownLabels' => $inArray[ 'KnownLabels' ], |
|
99 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
100 | 100 | ]); |
101 | 101 | return '<div class="tabbertab" id="tabOptions" title="Options">' |
102 | 102 | . '<style type="text/css" media="all" scoped>label { width: auto; }</style>' |
103 | 103 | . '<form method="get" action="' |
104 | - . $inArray['SuperGlobals']->server->get('PHP_SELF') |
|
104 | + . $inArray[ 'SuperGlobals' ]->server->get('PHP_SELF') |
|
105 | 105 | . '">' |
106 | 106 | . '<input type="submit" value="Apply" />' |
107 | 107 | . '<br/>' . implode('', $sReturn) |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | |
113 | 113 | private function turnRequestedValueIntoCheckboxStatus($inArray) |
114 | 114 | { |
115 | - if (is_null($inArray['SuperGlobals']->get($inArray['RequestedName']))) { |
|
116 | - $valToSet = (string) $inArray['Defaults'][$inArray['RequestedName']]; |
|
117 | - $inArray['SuperGlobals']->request->set($inArray['RequestedName'], $valToSet); |
|
115 | + if (is_null($inArray[ 'SuperGlobals' ]->get($inArray[ 'RequestedName' ]))) { |
|
116 | + $valToSet = (string) $inArray[ 'Defaults' ][ $inArray[ 'RequestedName' ] ]; |
|
117 | + $inArray[ 'SuperGlobals' ]->request->set($inArray[ 'RequestedName' ], $valToSet); |
|
118 | 118 | } |
119 | 119 | // var_dump($inArray['RequestedName']); |
120 | 120 | // echo '<hr/>'; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // var_dump($inArray['CheckedValue']); |
126 | 126 | // die(); |
127 | 127 | $checkboxStatus = ''; |
128 | - if ($inArray['SuperGlobals']->get($inArray['RequestedName']) === $inArray['CheckedValue']) { |
|
128 | + if ($inArray[ 'SuperGlobals' ]->get($inArray[ 'RequestedName' ]) === $inArray[ 'CheckedValue' ]) { |
|
129 | 129 | $checkboxStatus = 'checked '; |
130 | 130 | } |
131 | 131 | return $checkboxStatus; |
@@ -138,9 +138,9 @@ discard block |
||
138 | 138 | . '<input type="radio" name="displayOnlyDifferent" id="displayOnlyDifferent" value="1" ' |
139 | 139 | . $this->turnRequestedValueIntoCheckboxStatus([ |
140 | 140 | 'CheckedValue' => '1', |
141 | - 'Defaults' => $inArray['Defaults'], |
|
141 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
142 | 142 | 'RequestedName' => 'displayOnlyDifferent', |
143 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
143 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
144 | 144 | ]) |
145 | 145 | . '/>' |
146 | 146 | . '<label for="displayOnlyDifferent">Only the Different values</label>' |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | . '<input type="radio" name="displayOnlyDifferent" id="displayAll" value="0" ' |
149 | 149 | . $this->turnRequestedValueIntoCheckboxStatus([ |
150 | 150 | 'CheckedValue' => '0', |
151 | - 'Defaults' => $inArray['Defaults'], |
|
151 | + 'Defaults' => $inArray[ 'Defaults' ], |
|
152 | 152 | 'RequestedName' => 'displayOnlyDifferent', |
153 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
153 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
154 | 154 | ]) |
155 | 155 | . '/>' |
156 | 156 | . '<label for="displayAll">All</label>' |