Browse Source

accordion test

tags/1.0
Paul Rock 6 years ago
parent
commit
66321c59a4
  1. 61
      README.md

61
README.md

@ -132,38 +132,45 @@ for ($response->rewind(); $response->valid(); $response->next()) {
### How to configure the client
Sample of basic code:
```php
// Enable config class
use \RouterOS\Config;
use \RouterOS\Client;
// Create object of config class in one call
$config = new Config([
'host' => '192.168.1.3',
'user' => 'admin',
'pass' => 'admin'
]);
// Create object of class
$config = new Config();
$client = new Client($config);
```
// Set parameters of config
$config->set('host', '192.168.1.3')
$config->set('user', 'admin')
$config->set('pass', 'admin');
Or you can just create preconfigured client object with all
required settings like below:
// `set()` method supported inline style of syntax
$config
->set('host', '192.168.1.3')
->set('user', 'admin')
->set('pass', 'admin');
```php
use \RouterOS\Client;
$client = new Client([
'host' => '192.168.1.3',
'user' => 'admin',
'pass' => 'admin'
]);
```
Sample of basic code:
<details>
<summary>
<i>Advanced usage of Client class</i>
</summary>
```php
// Enable required classes
use \RouterOS\Config;
use \RouterOS\Client;
// Set the config
$config = new Config([
'host' => '192.168.1.3',
'user' => 'admin',
@ -171,21 +178,31 @@ $config = new Config([
]);
$client = new Client($config);
```
Or you can just create preconfigured client object with all
required settings like below:
```php
use \RouterOS\Client;
$client = new Client([
// Create object of config class in one call
$config = new Config([
'host' => '192.168.1.3',
'user' => 'admin',
'pass' => 'admin'
]);
// Create object of class
$config = new Config();
// Set parameters of config
$config->set('host', '192.168.1.3')
$config->set('user', 'admin')
$config->set('pass', 'admin');
// `set()` method supported inline style of syntax
$config
->set('host', '192.168.1.3')
->set('user', 'admin')
->set('pass', 'admin');
```
</details>
#### List of available configuration parameters
| Parameter | Type | Default | Description |

Loading…
Cancel
Save