From 66321c59a4deebd827b8b20230026ee986adeb12 Mon Sep 17 00:00:00 2001 From: Paul Rock Date: Wed, 24 Jul 2019 11:18:48 +0300 Subject: [PATCH] accordion test --- README.md | 61 +++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 11ae41a..c6aee95 100644 --- a/README.md +++ b/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: +
+ +Advanced usage of Client class + ```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'); ``` +
+ #### List of available configuration parameters | Parameter | Type | Default | Description |