1 | <?php |
||
14 | class XmlFileDefinitionCollection extends SiteDefinitionCollection |
||
15 | { |
||
16 | /** |
||
17 | * Constructor |
||
18 | * |
||
19 | * @param string $path Path to site definitions' dir |
||
20 | */ |
||
21 | 9 | public function __construct($path) |
|
33 | |||
34 | /** |
||
35 | * Replace arrays that contain a single element with the element itself |
||
36 | * |
||
37 | * @param array $config |
||
38 | * @return array |
||
39 | */ |
||
40 | 8 | protected function flattenConfig(array $config) |
|
52 | |||
53 | /** |
||
54 | * Extract a site's config from its XML file |
||
55 | * |
||
56 | * @param string $filepath Path to the XML file |
||
57 | * @return mixed |
||
58 | */ |
||
59 | 8 | protected function getConfigFromXmlFile($filepath) |
|
66 | |||
67 | /** |
||
68 | * Extract a site's config from its XML representation |
||
69 | * |
||
70 | * @param DOMElement $element Current node |
||
71 | * @return mixed |
||
72 | */ |
||
73 | 8 | protected function getElementConfig(DOMElement $element) |
|
90 | |||
91 | /** |
||
92 | * Extract a value from given element |
||
93 | * |
||
94 | * @param DOMElement $element |
||
95 | * @return mixed |
||
96 | */ |
||
97 | 8 | protected function getValueFromElement(DOMElement $element) |
|
103 | } |