1 | <?php |
||
23 | abstract class WebServer implements WebServerInterface |
||
24 | { |
||
25 | /** |
||
26 | * the name of a webserver. |
||
27 | * |
||
28 | * @var string the name of a webserver |
||
29 | */ |
||
30 | private $name; |
||
31 | |||
32 | /** |
||
33 | * the version of a webserver. |
||
34 | * |
||
35 | * @var string the version of a webserver |
||
36 | */ |
||
37 | private $version; |
||
38 | |||
39 | /** |
||
40 | * binaries that can be used to control the webserver. |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | private $binaries = []; |
||
45 | |||
46 | /** |
||
47 | * the parameter string to use to detect version and config file. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | private $detectionParameter = ''; |
||
52 | |||
53 | /** |
||
54 | * Constructor. |
||
55 | * |
||
56 | * @param string $name the name of a webserver |
||
57 | * @param string $version the version of a webserver |
||
58 | */ |
||
59 | 25 | public function __construct($name, $version = '') |
|
64 | |||
65 | /** |
||
66 | * Get the name of a webserver. |
||
67 | * |
||
68 | * @return string the name of the webserver |
||
69 | */ |
||
70 | 4 | public function getName() |
|
74 | |||
75 | /** |
||
76 | * Get the version of a webserver. |
||
77 | * |
||
78 | * @return string the version of the webserver |
||
79 | */ |
||
80 | 4 | public function getVersion() |
|
84 | |||
85 | /** |
||
86 | * Get the list of binaries that can be run to analyze. |
||
87 | * |
||
88 | * @return array the list of binaries that can be run |
||
89 | */ |
||
90 | 5 | public function getBinaries() |
|
94 | |||
95 | 15 | public function setBinaries(array $binaries) |
|
101 | |||
102 | 15 | public function setDetectionParameter($parameter = '') |
|
108 | |||
109 | 1 | public function getSettings($fullPathBinary) |
|
115 | |||
116 | abstract public function extractVersion($settings = ''); |
||
117 | |||
118 | abstract public function extractRootConfigurationFile($settings = ''); |
||
119 | } |
||
120 |