Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | private function _get($field = null, $value = null) |
||
47 | { |
||
48 | $packet = $this->_client->getPacket(); |
||
49 | $getTag = $packet->addChild('db_server')->addChild('get'); |
||
50 | |||
51 | $filterTag = $getTag->addChild('filter'); |
||
52 | if (!is_null($field)) { |
||
53 | $filterTag->addChild($field, $value); |
||
54 | } |
||
55 | |||
56 | $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); |
||
57 | |||
58 | $items = []; |
||
59 | foreach ($response->xpath('//result') as $xmlResult) { |
||
60 | $items[] = new Struct\Info($xmlResult->data); |
||
61 | } |
||
62 | |||
63 | return $items; |
||
64 | } |
||
65 | |||
67 |