@@ -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>' |
@@ -75,71 +75,71 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | private function displayTableFromMultiLevelArray($inArray) |
| 77 | 77 | { |
| 78 | - if ((!is_array($inArray['source'])) || (!is_array($inArray['destination']))) { |
|
| 78 | + if ((!is_array($inArray[ 'source' ])) || (!is_array($inArray[ 'destination' ]))) { |
|
| 79 | 79 | return ''; |
| 80 | 80 | } |
| 81 | - $firstRow = $this->mergeArraysIntoFirstSecond($inArray['source'], $inArray['destination'], [ |
|
| 81 | + $firstRow = $this->mergeArraysIntoFirstSecond($inArray[ 'source' ], $inArray[ 'destination' ], [ |
|
| 82 | 82 | 'first', |
| 83 | 83 | 'second', |
| 84 | 84 | ]); |
| 85 | - $secondRow = $this->mergeArraysIntoFirstSecond($inArray['destination'], $inArray['source'], [ |
|
| 85 | + $secondRow = $this->mergeArraysIntoFirstSecond($inArray[ 'destination' ], $inArray[ 'source' ], [ |
|
| 86 | 86 | 'second', |
| 87 | 87 | 'first', |
| 88 | 88 | ]); |
| 89 | 89 | $row = array_merge($firstRow, $secondRow); |
| 90 | 90 | ksort($row); |
| 91 | - $urlArguments = '?Label=' . $inArray['SuperGlobals']->get('Label'); |
|
| 92 | - $sString[] = '<table style="width:100%">' |
|
| 91 | + $urlArguments = '?Label=' . $inArray[ 'SuperGlobals' ]->get('Label'); |
|
| 92 | + $sString[ ] = '<table style="width:100%">' |
|
| 93 | 93 | . '<thead><tr>' |
| 94 | 94 | . '<th>Identifier</th>' |
| 95 | - . '<th><a href="' . $this->config['Servers'][$inArray['SuperGlobals']->get('localConfig')]['url'] |
|
| 95 | + . '<th><a href="' . $this->config[ 'Servers' ][ $inArray[ 'SuperGlobals' ]->get('localConfig') ][ 'url' ] |
|
| 96 | 96 | . $urlArguments . '" target="_blank">' |
| 97 | - . $this->config['Servers'][$inArray['SuperGlobals']->get('localConfig')]['name'] . '</a></th>' |
|
| 98 | - . '<th><a href="' . $this->config['Servers'][$inArray['SuperGlobals']->get('serverConfig')]['url'] |
|
| 97 | + . $this->config[ 'Servers' ][ $inArray[ 'SuperGlobals' ]->get('localConfig') ][ 'name' ] . '</a></th>' |
|
| 98 | + . '<th><a href="' . $this->config[ 'Servers' ][ $inArray[ 'SuperGlobals' ]->get('serverConfig') ][ 'url' ] |
|
| 99 | 99 | . $urlArguments . '" target="_blank">' |
| 100 | - . $this->config['Servers'][$inArray['SuperGlobals']->get('serverConfig')]['name'] . '</a></th>' |
|
| 100 | + . $this->config[ 'Servers' ][ $inArray[ 'SuperGlobals' ]->get('serverConfig') ][ 'name' ] . '</a></th>' |
|
| 101 | 101 | . '</tr></thead>' |
| 102 | 102 | . '<tbody>'; |
| 103 | - if ($inArray['SuperGlobals']->get('displayOnlyDifferent') == '1') { |
|
| 103 | + if ($inArray[ 'SuperGlobals' ]->get('displayOnlyDifferent') == '1') { |
|
| 104 | 104 | $displayOnlyDifferent = true; |
| 105 | 105 | } else { |
| 106 | 106 | $displayOnlyDifferent = false; |
| 107 | 107 | } |
| 108 | 108 | foreach ($row as $key => $value) { |
| 109 | 109 | $rowString = '<tr><td style="width:20%;">' . $key . '</td><td style="width:40%;">' |
| 110 | - . str_replace(',', ', ', $value['first']) . '</td><td style="width:40%;">' |
|
| 111 | - . str_replace(',', ', ', $value['second']) . '</td></tr>'; |
|
| 110 | + . str_replace(',', ', ', $value[ 'first' ]) . '</td><td style="width:40%;">' |
|
| 111 | + . str_replace(',', ', ', $value[ 'second' ]) . '</td></tr>'; |
|
| 112 | 112 | if ($displayOnlyDifferent) { |
| 113 | - if ($value['first'] != $value['second']) { |
|
| 114 | - $sString[] = $rowString; |
|
| 113 | + if ($value[ 'first' ] != $value[ 'second' ]) { |
|
| 114 | + $sString[ ] = $rowString; |
|
| 115 | 115 | } |
| 116 | 116 | } else { |
| 117 | - $sString[] = $rowString; |
|
| 117 | + $sString[ ] = $rowString; |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | - $sString[] = '</tbody></table>'; |
|
| 120 | + $sString[ ] = '</tbody></table>'; |
|
| 121 | 121 | return implode('', $sString); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | private function getConfiguration() |
| 125 | 125 | { |
| 126 | 126 | $strdConfig = $this->configuredDeployedInformators(); |
| 127 | - foreach ($strdConfig['informators'] as $key => $value) { |
|
| 128 | - $this->config['Servers'][] = [ |
|
| 127 | + foreach ($strdConfig[ 'informators' ] as $key => $value) { |
|
| 128 | + $this->config[ 'Servers' ][ ] = [ |
|
| 129 | 129 | 'name' => $key, |
| 130 | 130 | 'url' => $value, |
| 131 | 131 | ]; |
| 132 | 132 | } |
| 133 | - $haystack = array_keys($strdConfig['informators']); |
|
| 134 | - $this->config['Defaults']['Label'] = $strdConfig['default']['label']; |
|
| 135 | - $this->config['Defaults']['localConfig'] = array_search($strdConfig['default']['source'], $haystack); |
|
| 136 | - $this->config['Defaults']['serverConfig'] = array_search($strdConfig['default']['target'], $haystack); |
|
| 137 | - $this->config['Defaults']['displayOnlyDifferent'] = $strdConfig['default']['typeOfResults']; |
|
| 133 | + $haystack = array_keys($strdConfig[ 'informators' ]); |
|
| 134 | + $this->config[ 'Defaults' ][ 'Label' ] = $strdConfig[ 'default' ][ 'label' ]; |
|
| 135 | + $this->config[ 'Defaults' ][ 'localConfig' ] = array_search($strdConfig[ 'default' ][ 'source' ], $haystack); |
|
| 136 | + $this->config[ 'Defaults' ][ 'serverConfig' ] = array_search($strdConfig[ 'default' ][ 'target' ], $haystack); |
|
| 137 | + $this->config[ 'Defaults' ][ 'displayOnlyDifferent' ] = $strdConfig[ 'default' ][ 'typeOfResults' ]; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - private function mergeArraysIntoFirstSecond($firstArray, $secondArray, $pSequence = ['first', 'second']) |
|
| 140 | + private function mergeArraysIntoFirstSecond($firstArray, $secondArray, $pSequence = [ 'first', 'second' ]) |
|
| 141 | 141 | { |
| 142 | - $row = []; |
|
| 142 | + $row = [ ]; |
|
| 143 | 143 | foreach ($firstArray as $key => $value) { |
| 144 | 144 | if (is_array($value)) { |
| 145 | 145 | foreach ($value as $key2 => $value2) { |
@@ -148,39 +148,39 @@ discard block |
||
| 148 | 148 | if (is_array($value3)) { |
| 149 | 149 | foreach ($value3 as $key4 => $value4) { |
| 150 | 150 | $keyCrt = $key . '_' . $key2 . '__' . $key3 . '__' . $key4; |
| 151 | - $row[$keyCrt][$pSequence[0]] = $value4; |
|
| 152 | - if (isset($secondArray[$key][$key2][$key3][$key4])) { |
|
| 153 | - $row[$keyCrt][$pSequence[1]] = $secondArray[$key][$key2][$key3][$key4]; |
|
| 151 | + $row[ $keyCrt ][ $pSequence[ 0 ] ] = $value4; |
|
| 152 | + if (isset($secondArray[ $key ][ $key2 ][ $key3 ][ $key4 ])) { |
|
| 153 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = $secondArray[ $key ][ $key2 ][ $key3 ][ $key4 ]; |
|
| 154 | 154 | } else { |
| 155 | - $row[$keyCrt][$pSequence[1]] = ''; |
|
| 155 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = ''; |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | } else { |
| 159 | 159 | $keyCrt = $key . '_' . $key2 . '__' . $key3; |
| 160 | - $row[$keyCrt][$pSequence[0]] = $value3; |
|
| 161 | - if (isset($secondArray[$key][$key2][$key3])) { |
|
| 162 | - $row[$keyCrt][$pSequence[1]] = $secondArray[$key][$key2][$key3]; |
|
| 160 | + $row[ $keyCrt ][ $pSequence[ 0 ] ] = $value3; |
|
| 161 | + if (isset($secondArray[ $key ][ $key2 ][ $key3 ])) { |
|
| 162 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = $secondArray[ $key ][ $key2 ][ $key3 ]; |
|
| 163 | 163 | } else { |
| 164 | - $row[$keyCrt][$pSequence[1]] = ''; |
|
| 164 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = ''; |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | } else { |
| 169 | 169 | $keyCrt = $key . '_' . $key2; |
| 170 | - $row[$keyCrt][$pSequence[0]] = $value2; |
|
| 171 | - if (isset($secondArray[$key][$key2])) { |
|
| 172 | - $row[$keyCrt][$pSequence[1]] = $secondArray[$key][$key2]; |
|
| 170 | + $row[ $keyCrt ][ $pSequence[ 0 ] ] = $value2; |
|
| 171 | + if (isset($secondArray[ $key ][ $key2 ])) { |
|
| 172 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = $secondArray[ $key ][ $key2 ]; |
|
| 173 | 173 | } else { |
| 174 | - $row[$keyCrt][$pSequence[1]] = ''; |
|
| 174 | + $row[ $keyCrt ][ $pSequence[ 1 ] ] = ''; |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | } else { |
| 179 | - $row[$key][$pSequence[0]] = $value; |
|
| 180 | - if (isset($secondArray[$key])) { |
|
| 181 | - $row[$key][$pSequence[1]] = $secondArray[$key]; |
|
| 179 | + $row[ $key ][ $pSequence[ 0 ] ] = $value; |
|
| 180 | + if (isset($secondArray[ $key ])) { |
|
| 181 | + $row[ $key ][ $pSequence[ 1 ] ] = $secondArray[ $key ]; |
|
| 182 | 182 | } else { |
| 183 | - $row[$key][$pSequence[1]] = ''; |
|
| 183 | + $row[ $key ][ $pSequence[ 1 ] ] = ''; |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | } |
@@ -189,38 +189,38 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | private function prepareForOutputForm($inArray) |
| 191 | 191 | { |
| 192 | - $urlToGetLbl = $this->config['Servers'][$this->config['Defaults']['localConfig']]['url'] |
|
| 192 | + $urlToGetLbl = $this->config[ 'Servers' ][ $this->config[ 'Defaults' ][ 'localConfig' ] ][ 'url' ] |
|
| 193 | 193 | . '?Label=---' . urlencode(' List of known labels'); |
| 194 | - $knownLabels = $this->getContentFromUrlThroughCurlAsArrayIfJson($urlToGetLbl)['response']; |
|
| 194 | + $knownLabels = $this->getContentFromUrlThroughCurlAsArrayIfJson($urlToGetLbl)[ 'response' ]; |
|
| 195 | 195 | echo $this->setFormOptions([ |
| 196 | - 'Defaults' => $this->config['Defaults'], |
|
| 196 | + 'Defaults' => $this->config[ 'Defaults' ], |
|
| 197 | 197 | 'KnownLabels' => $knownLabels, |
| 198 | - 'Servers' => $this->config['Servers'], |
|
| 199 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
| 198 | + 'Servers' => $this->config[ 'Servers' ], |
|
| 199 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
| 200 | 200 | ]); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | private function processInfos() |
| 204 | 204 | { |
| 205 | - if (isset($_GET['localConfig']) && isset($_GET['serverConfig'])) { |
|
| 206 | - $urlArguments = '?Label=' . urlencode($_GET['Label']); |
|
| 207 | - $source = $this->config['Servers'][$_GET['localConfig']]['url'] . $urlArguments; |
|
| 205 | + if (isset($_GET[ 'localConfig' ]) && isset($_GET[ 'serverConfig' ])) { |
|
| 206 | + $urlArguments = '?Label=' . urlencode($_GET[ 'Label' ]); |
|
| 207 | + $source = $this->config[ 'Servers' ][ $_GET[ 'localConfig' ] ][ 'url' ] . $urlArguments; |
|
| 208 | 208 | $this->localConfiguration = $this->getContentFromUrlThroughCurlAsArrayIfJson($source); |
| 209 | - $destination = $this->config['Servers'][$_GET['serverConfig']]['url'] . $urlArguments; |
|
| 209 | + $destination = $this->config[ 'Servers' ][ $_GET[ 'serverConfig' ] ][ 'url' ] . $urlArguments; |
|
| 210 | 210 | $this->serverConfiguration = $this->getContentFromUrlThroughCurlAsArrayIfJson($destination); |
| 211 | 211 | } else { |
| 212 | - $this->localConfiguration = ['response' => '', 'info' => '']; |
|
| 213 | - $this->serverConfiguration = ['response' => '', 'info' => '']; |
|
| 212 | + $this->localConfiguration = [ 'response' => '', 'info' => '' ]; |
|
| 213 | + $this->serverConfiguration = [ 'response' => '', 'info' => '' ]; |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | private function setFooterHtml() |
| 218 | 218 | { |
| 219 | - $sReturn = []; |
|
| 220 | - $sReturn[] = '</div><!-- from main Tabber -->'; |
|
| 221 | - $sReturn[] = '<div class="resetOnly author">© 2015 Daniel Popiniuc</div>'; |
|
| 222 | - $sReturn[] = '<hr/>'; |
|
| 223 | - $sReturn[] = '<div class="disclaimer">' |
|
| 219 | + $sReturn = [ ]; |
|
| 220 | + $sReturn[ ] = '</div><!-- from main Tabber -->'; |
|
| 221 | + $sReturn[ ] = '<div class="resetOnly author">© 2015 Daniel Popiniuc</div>'; |
|
| 222 | + $sReturn[ ] = '<hr/>'; |
|
| 223 | + $sReturn[ ] = '<div class="disclaimer">' |
|
| 224 | 224 | . 'The developer cannot be liable of any data input or results, ' |
| 225 | 225 | . 'included but not limited to any implication of these ' |
| 226 | 226 | . '(anywhere and whomever there might be these)!' |
@@ -232,9 +232,9 @@ discard block |
||
| 232 | 232 | { |
| 233 | 233 | return '<div class="tabbertab" id="tabCurl" title="CURL infos">' |
| 234 | 234 | . $this->displayTableFromMultiLevelArray([ |
| 235 | - 'source' => $this->localConfiguration['info'], |
|
| 236 | - 'destination' => $this->serverConfiguration['info'], |
|
| 237 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
| 235 | + 'source' => $this->localConfiguration[ 'info' ], |
|
| 236 | + 'destination' => $this->serverConfiguration[ 'info' ], |
|
| 237 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
| 238 | 238 | ]) |
| 239 | 239 | . '</div><!--from tabCurl-->'; |
| 240 | 240 | } |
@@ -242,12 +242,12 @@ discard block |
||
| 242 | 242 | private function setFormInfos($inArray) |
| 243 | 243 | { |
| 244 | 244 | return '<div class="tabbertab' |
| 245 | - . (is_null($inArray['SuperGlobals']->get('Label')) ? '' : ' tabbertabdefault') |
|
| 245 | + . (is_null($inArray[ 'SuperGlobals' ]->get('Label')) ? '' : ' tabbertabdefault') |
|
| 246 | 246 | . '" id="tabConfigs" title="Informations">' |
| 247 | 247 | . $this->displayTableFromMultiLevelArray([ |
| 248 | - 'source' => $this->localConfiguration['response'], |
|
| 249 | - 'destination' => $this->serverConfiguration['response'], |
|
| 250 | - 'SuperGlobals' => $inArray['SuperGlobals'], |
|
| 248 | + 'source' => $this->localConfiguration[ 'response' ], |
|
| 249 | + 'destination' => $this->serverConfiguration[ 'response' ], |
|
| 250 | + 'SuperGlobals' => $inArray[ 'SuperGlobals' ], |
|
| 251 | 251 | ]) |
| 252 | 252 | . '</div><!--from tabConfigs-->'; |
| 253 | 253 | } |
@@ -256,12 +256,12 @@ discard block |
||
| 256 | 256 | { |
| 257 | 257 | return $this->setHeaderCommon([ |
| 258 | 258 | 'lang' => 'en-US', |
| 259 | - 'title' => $this->applicationFlags['name'], |
|
| 259 | + 'title' => $this->applicationFlags[ 'name' ], |
|
| 260 | 260 | 'css' => 'css/main.css', |
| 261 | 261 | 'javascript' => 'js/tabber.min.js', |
| 262 | 262 | ]) |
| 263 | 263 | . $this->setJavascriptContent('document.write(\'<style type="text/css">.tabber{display:none;}</style>\');') |
| 264 | - . '<h1>' . $this->applicationFlags['name'] . '</h1>' |
|
| 264 | + . '<h1>' . $this->applicationFlags[ 'name' ] . '</h1>' |
|
| 265 | 265 | . '<div class="tabber" id="tab">'; |
| 266 | 266 | } |
| 267 | 267 | } |