Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class XML |
||
6 | { |
||
7 | private $xml; |
||
8 | |||
9 | 64 | public function __construct($xmlPath) |
|
10 | { |
||
11 | 64 | $this->xml = $this->pathToXML($xmlPath); |
|
12 | 32 | } |
|
13 | |||
14 | 62 | public function find($xpath) |
|
15 | { |
||
16 | 62 | $xml = new \SimpleXMLElement($this->xml); |
|
17 | |||
18 | 62 | return $xml->xpath($xpath); |
|
19 | } |
||
20 | |||
21 | 64 | public function pathToXML($xmlPath) |
|
28 | } |
||
29 | } |
||
30 |