| Conditions | 3 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 19 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | View Code Duplication | public function _get($keyId = null) |
|
| 57 | { |
||
| 58 | $packet = $this->_client->getPacket(); |
||
| 59 | $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_info'); |
||
| 60 | |||
| 61 | $filterTag = $getTag->addChild('filter'); |
||
| 62 | if (!is_null($keyId)) { |
||
| 63 | $filterTag->addChild('key', $keyId); |
||
| 64 | } |
||
| 65 | |||
| 66 | $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); |
||
| 67 | |||
| 68 | $items = []; |
||
| 69 | foreach ($response->xpath('//result') as $xmlResult) { |
||
| 70 | $items[] = new Struct\Info($xmlResult->key_info); |
||
| 71 | } |
||
| 72 | |||
| 73 | return $items; |
||
| 74 | } |
||
| 75 | |||
| 77 |