1 | <?php |
||
13 | class CoreUtils |
||
14 | { |
||
15 | /** |
||
16 | * @var array holds all version numbers of installed packages |
||
17 | */ |
||
18 | private $versions; |
||
19 | |||
20 | /** |
||
21 | * @param array $versions Array containing version numbers of installed packages |
||
22 | */ |
||
23 | 8 | public function __construct($versions) |
|
27 | |||
28 | /** |
||
29 | * returns versions in response header format |
||
30 | * |
||
31 | * @return string version |
||
32 | */ |
||
33 | 2 | public function getVersionInHeaderFormat() |
|
42 | |||
43 | /** |
||
44 | * @return array versions |
||
45 | */ |
||
46 | public function getVersion() |
||
54 | |||
55 | /** |
||
56 | * Finds the version of the current wrapper. |
||
57 | * |
||
58 | * @return array wrapper version |
||
59 | * @throws \RuntimeException in case version was not found in versions stack. |
||
60 | */ |
||
61 | 2 | public function getWrapperVersion() |
|
71 | } |
||
72 |