|
|
|
@ -102,7 +102,7 @@ class Client implements Interfaces\ClientInterface |
|
|
|
/** |
|
|
|
* Send write query to RouterOS (modern version of write) |
|
|
|
* |
|
|
|
* @param string $endpoint Path of API query |
|
|
|
* @param string|Query $endpoint Path of API query or Query object |
|
|
|
* @param array|null $where List of where filters |
|
|
|
* @param string|null $operations Some operations which need make on response |
|
|
|
* @param string|null $tag Mark query with tag |
|
|
|
@ -111,10 +111,12 @@ class Client implements Interfaces\ClientInterface |
|
|
|
* @throws \RouterOS\Exceptions\ClientException |
|
|
|
* @since 1.0.0 |
|
|
|
*/ |
|
|
|
public function query(string $endpoint, array $where = null, string $operations = null, string $tag = null): Client |
|
|
|
public function query($endpoint, array $where = null, string $operations = null, string $tag = null): Client |
|
|
|
{ |
|
|
|
// If endpoint is string then build Query object
|
|
|
|
$query = new Query($endpoint); |
|
|
|
$query = ($endpoint instanceof Query) |
|
|
|
? $endpoint |
|
|
|
: new Query($endpoint); |
|
|
|
|
|
|
|
// Parse where array
|
|
|
|
if (!empty($where)) { |
|
|
|
|