1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @author stev leibelt <[email protected]> |
4
|
|
|
* @since 2017-03-30 |
5
|
|
|
*/ |
6
|
|
|
|
7
|
|
|
namespace Net\Bazzline\Component\ApacheServerStatusParser\DomainModel; |
8
|
|
|
|
9
|
|
|
class Information implements ReduceDataAbleToArrayInterface |
10
|
|
|
{ |
11
|
|
|
const REDUCED_DATA_TO_ARRAY_KEY_DATE_OF_BUILT = 'date_of_built'; |
12
|
|
|
const REDUCED_DATA_TO_ARRAY_KEY_IDENTIFIER = 'identifier'; |
13
|
|
|
const REDUCED_DATA_TO_ARRAY_KEY_MODE_OF_MPM = 'mode_of_mpm'; |
14
|
|
|
const REDUCED_DATA_TO_ARRAY_KEY_VERSION = 'version'; |
15
|
|
|
|
16
|
|
|
/** @var string */ |
17
|
|
|
private $dateOfBuilt; |
18
|
|
|
|
19
|
|
|
/** @var string */ |
20
|
|
|
private $identifier; |
21
|
|
|
|
22
|
|
|
/** @var string */ |
23
|
|
|
private $modeOfMpm; |
24
|
|
|
|
25
|
|
|
/** @var string */ |
26
|
|
|
private $version; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Information constructor. |
30
|
|
|
* |
31
|
|
|
* @param string $dateOfBuilt |
32
|
|
|
* @param string $identifier |
33
|
|
|
* @param string $modeOfMpm |
34
|
|
|
* @param string $version |
35
|
|
|
*/ |
36
|
|
|
public function __construct( |
37
|
|
|
$dateOfBuilt, |
38
|
|
|
$identifier, |
39
|
|
|
$modeOfMpm, |
40
|
|
|
$version |
41
|
|
|
) { |
42
|
|
|
$this->dateOfBuilt = $dateOfBuilt; |
43
|
|
|
$this->identifier = $identifier; |
44
|
|
|
$this->modeOfMpm = $modeOfMpm; |
45
|
|
|
$this->version = $version; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @return string |
50
|
|
|
*/ |
51
|
|
|
public function dateOfBuilt() |
52
|
|
|
{ |
53
|
|
|
return $this->dateOfBuilt; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return string |
58
|
|
|
*/ |
59
|
|
|
public function identifier() |
60
|
|
|
{ |
61
|
|
|
return $this->identifier; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return string |
66
|
|
|
*/ |
67
|
|
|
public function modeOfMpm() |
68
|
|
|
{ |
69
|
|
|
return $this->modeOfMpm; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return string |
74
|
|
|
*/ |
75
|
|
|
public function version() |
76
|
|
|
{ |
77
|
|
|
return $this->version; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return array |
82
|
|
|
* [ |
83
|
|
|
* 'date_of_built' : string, |
84
|
|
|
* 'identifier' : string, |
85
|
|
|
* ' 'mode_of_mpm' : string, |
86
|
|
|
* 'version' : string |
87
|
|
|
* ] |
88
|
|
|
*/ |
89
|
|
|
public function reduceDataToArray() |
90
|
|
|
{ |
91
|
|
|
return [ |
92
|
|
|
self::REDUCED_DATA_TO_ARRAY_KEY_DATE_OF_BUILT => $this->dateOfBuilt(), |
93
|
|
|
self::REDUCED_DATA_TO_ARRAY_KEY_IDENTIFIER => $this->identifier(), |
94
|
|
|
self::REDUCED_DATA_TO_ARRAY_KEY_MODE_OF_MPM => $this->modeOfMpm(), |
95
|
|
|
self::REDUCED_DATA_TO_ARRAY_KEY_VERSION => $this->version() |
96
|
|
|
]; |
97
|
|
|
} |
98
|
|
|
} |
99
|
|
|
|