Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function get($field, $value) |
||
18 | { |
||
19 | $packet = $this->_client->getPacket(); |
||
20 | $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); |
||
21 | $filterTag = $getTag->addChild('filter'); |
||
22 | |||
23 | if (!is_null($field)) { |
||
24 | $filterTag->addChild($field, $value); |
||
25 | } |
||
26 | |||
27 | $response = $this->_client->request($packet, Client::RESPONSE_FULL); |
||
28 | $xmlResult = $response->xpath('//result')[0]; |
||
29 | |||
30 | return new Info($xmlResult); |
||
31 | } |
||
32 | } |
||
33 |