1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* The MIT License |
5
|
|
|
* |
6
|
|
|
* Copyright 2016 Daniel Popiniuc. |
7
|
|
|
* |
8
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy |
9
|
|
|
* of this software and associated documentation files (the "Software"), to deal |
10
|
|
|
* in the Software without restriction, including without limitation the rights |
11
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
12
|
|
|
* copies of the Software, and to permit persons to whom the Software is |
13
|
|
|
* furnished to do so, subject to the following conditions: |
14
|
|
|
* |
15
|
|
|
* The above copyright notice and this permission notice shall be included in |
16
|
|
|
* all copies or substantial portions of the Software. |
17
|
|
|
* |
18
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
19
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
20
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
21
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
22
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
23
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
24
|
|
|
* THE SOFTWARE. |
25
|
|
|
*/ |
26
|
|
|
|
27
|
|
|
namespace danielgp\informator; |
28
|
|
|
|
29
|
|
|
trait InformatorKnownLabels |
30
|
|
|
{ |
31
|
|
|
|
32
|
|
|
protected function knownLabelsGlobal($inArray) |
33
|
|
|
{ |
34
|
|
|
return [ |
35
|
|
|
'--- List of known labels' => '', |
36
|
|
|
'Apache Info' => ['getApacheDetails'], |
37
|
|
|
'Auto Dependencies' => ['getPackageDetailsFromGivenComposerLockFile', $inArray['composerLockFile']], |
38
|
|
|
'Auto Dependencies File' => [$inArray['composerLockFile']], |
39
|
|
|
'Client Info' => ['getClientBrowserDetailsForInformator', null], |
40
|
|
|
'Informator File Details' => ['getFileDetails', $inArray['informatorFile']], |
41
|
|
|
'MySQL Databases All' => ['getMySQLinfo', ['Databases All']], |
42
|
|
|
'MySQL Databases Client' => ['getMySQLinfo', ['Databases Client']], |
43
|
|
|
'MySQL Engines Active' => ['getMySQLinfo', ['Engines Active']], |
44
|
|
|
'MySQL Engines All' => ['getMySQLinfo', ['Engines All']], |
45
|
|
|
'MySQL General' => ['getMySQLinfo', ['General']], |
46
|
|
|
'MySQL Variables Global' => ['getMySQLinfo', ['Variables Global']], |
47
|
|
|
'MySQL Info' => ['getMySQLinfo', ['Engines Active', 'General', 'Variables Global']], |
48
|
|
|
'Php Extensions Loaded' => ['getPhpDetails', ['Extensions Loaded']], |
49
|
|
|
'Php General' => ['getPhpDetails', ['General']], |
50
|
|
|
'Php INI Settings' => ['getPhpDetails', ['INI Settings']], |
51
|
|
|
'Php Stream Filters' => ['getPhpDetails', ['Stream Filters']], |
52
|
|
|
'Php Stream Transports' => ['getPhpDetails', ['Stream Transports']], |
53
|
|
|
'Php Stream Wrappers' => ['getPhpDetails', ['Stream Wrappers']], |
54
|
|
|
'Php Info' => ['getPhpDetails'], |
55
|
|
|
'Server Info' => ['getServerDetails'], |
56
|
|
|
'System Info' => ['systemInfo'], |
57
|
|
|
'Tomcat Info' => ['getTomcatDetails'], |
58
|
|
|
]; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
protected function knownLabelsForMySql() |
62
|
|
|
{ |
63
|
|
|
return [ |
64
|
|
|
'Databases All' => ['getMySQLlistDatabases', false], |
65
|
|
|
'Databases Client' => ['getMySQLlistDatabases', true], |
66
|
|
|
'Engines Active' => ['getMySQLlistEngines', true], |
67
|
|
|
'Engines All' => ['getMySQLlistEngines', false], |
68
|
|
|
'General' => ['getMySQLgenericInformations'], |
69
|
|
|
'Variables Global' => ['getMySQLglobalVariables'], |
70
|
|
|
]; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
protected function knownLabelsForPhp() |
74
|
|
|
{ |
75
|
|
|
return [ |
76
|
|
|
'Extensions Loaded' => ['setArrayValuesAsKey', 'get_loaded_extensions'], |
77
|
|
|
'Stream Filters' => ['setArrayValuesAsKey', 'stream_get_filters'], |
78
|
|
|
'Stream Transports' => ['setArrayValuesAsKey', 'stream_get_transports'], |
79
|
|
|
'Stream Wrappers' => ['setArrayValuesAsKey', 'stream_get_wrappers'], |
80
|
|
|
'Temporary Folder' => ['getTemporaryFolder'], |
81
|
|
|
]; |
82
|
|
|
} |
83
|
|
|
} |
84
|
|
|
|