| @@ 69-78 (lines=10) @@ | ||
| 66 | * @param integer|string $value |
|
| 67 | * @return bool |
|
| 68 | */ |
|
| 69 | public function delete($field, $value) |
|
| 70 | { |
|
| 71 | $packet = $this->_client->getPacket(); |
|
| 72 | $delTag = $packet->addChild($this->_wrapperTag)->addChild('del_rec'); |
|
| 73 | $delTag->addChild('filter')->addChild($field, $value); |
|
| 74 | $delTag->addChild('template'); |
|
| 75 | ||
| 76 | $response = $this->_client->request($packet); |
|
| 77 | return 'ok' === (string)$response->status; |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||
| @@ 43-51 (lines=9) @@ | ||
| 40 | * @param integer $siteId |
|
| 41 | * @return bool |
|
| 42 | */ |
|
| 43 | public function delete($field, $value, $siteId) |
|
| 44 | { |
|
| 45 | $packet = $this->_client->getPacket(); |
|
| 46 | $filter = $packet->addChild($this->_wrapperTag)->addChild('remove')->addChild('filter'); |
|
| 47 | $filter->addChild('site-id', $siteId); |
|
| 48 | $filter->addChild($field, $value); |
|
| 49 | $response = $this->_client->request($packet); |
|
| 50 | return 'ok' === (string)$response->status; |
|
| 51 | } |
|
| 52 | ||
| 53 | } |
|
| 54 | ||