| @@ 251-256 (lines=6) @@ | ||
| 248 | */ |
|
| 249 | private static function checkParams(array $params, $paramsPurpose) |
|
| 250 | { |
|
| 251 | if (empty($params) || !is_array($params) || !is_assoc_array($params)) { |
|
| 252 | throw new WSException(sprintf( |
|
| 253 | "You have to specify at least one search parameter (prop => value) in order to %s", |
|
| 254 | $paramsPurpose |
|
| 255 | )); |
|
| 256 | } |
|
| 257 | return true; |
|
| 258 | } |
|
| 259 | ||
| @@ 103-108 (lines=6) @@ | ||
| 100 | */ |
|
| 101 | public function invokeOperation($operation, array $params = null, $method = 'POST') |
|
| 102 | { |
|
| 103 | if (empty($params) || !is_array($params) || !is_assoc_array($params)) { |
|
| 104 | throw new WSException( |
|
| 105 | "You have to specified a list of operation parameters, |
|
| 106 | but apparently it's not an associative array ('prop' => value), you must fix it!" |
|
| 107 | ); |
|
| 108 | } |
|
| 109 | ||
| 110 | $params['operation'] = $operation; |
|
| 111 | return $this->session->sendHttpRequest($params, $method); |
|