2
2
// Copyright 1999-2016. Parallels IP Holdings GmbH.
3
3
4
4
namespace PleskX \Api ;
5
- use PleskX \Api \Client \Exception ;
6
5
use SimpleXMLElement ;
7
6
8
7
/**
@@ -152,7 +151,7 @@ public function request($request, $mode = self::RESPONSE_SHORT)
152
151
*
153
152
* @param string $request
154
153
* @return XmlResponse
155
- * @throws Exception
154
+ * @throws Client\ Exception
156
155
*/
157
156
private function _performHttpRequest ($ request )
158
157
{
@@ -194,6 +193,7 @@ private function _performHttpRequest($request)
194
193
* @param $requests
195
194
* @param int $mode
196
195
* @return array
196
+ * @throws Client\Exception
197
197
*/
198
198
public function multiRequest ($ requests , $ mode = self ::RESPONSE_SHORT )
199
199
{
@@ -202,7 +202,7 @@ public function multiRequest($requests, $mode = self::RESPONSE_SHORT)
202
202
203
203
foreach ($ requests as $ request ) {
204
204
if ($ request instanceof SimpleXMLElement) {
205
- throw new Exception ('SimpleXML type of request is not supported for multi requests. ' );
205
+ throw new Client \ Exception ('SimpleXML type of request is not supported for multi requests. ' );
206
206
} else {
207
207
if (is_array ($ request )) {
208
208
$ request = $ this ->_arrayToXml ($ request , $ requestXml )->asXML ();
@@ -214,7 +214,7 @@ public function multiRequest($requests, $mode = self::RESPONSE_SHORT)
214
214
}
215
215
216
216
if ('sdk ' == $ this ->_protocol ) {
217
- throw new Exception ('Multi requests are not supported via SDK. ' );
217
+ throw new Client \ Exception ('Multi requests are not supported via SDK. ' );
218
218
} else {
219
219
$ responseXml = $ this ->_performHttpRequest ($ requestXml ->asXML ());
220
220
}
@@ -281,7 +281,7 @@ public static function getExecutionLog()
281
281
* Verify that response does not contain errors
282
282
*
283
283
* @param XmlResponse $xml
284
- * @throws \ Exception
284
+ * @throws Exception
285
285
*/
286
286
protected function _verifyResponse ($ xml )
287
287
{
0 commit comments