diff --git a/README.md b/README.md index 31a8f2b..f6aeb39 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ To use this extension, configure hiart component in your application config: 'components' => [ 'hiart' => [ 'class' => \hiqdev\hiart\rest\Connection::class, - 'requestClass' => \hiqdev\hiart\curl\Request::class, + 'requestClass' => \hiqdev\hiart\auto\Request::class, 'baseUri' => 'https://site.com/api/v3/', ], ], @@ -53,15 +53,16 @@ To use this extension, configure hiart component in your application config: Note three main options: - `class` specifies class that actually implements API to be accessed, **REST** in this case -- `requestClass` specifies transport implementation to be used, **cURL** in this case +- `requestClass` specifies transport implementation to be used, **auto** in this case - `baseUri` specifies starting point of the API ### Transports Available transports are: -- [PHP streams](http://php.net/manual/en/book.stream.php), **default**, included in this package -- [cURL](http://php.net/manual/en/book.curl.php), provided with [yii2-hiart-curl](https://github.com/hiqdev/yii2-hiart-curl) +- **auto** - auto detects best supported transport +- [PHP streams](http://php.net/manual/en/book.stream.php), the most generic fallback, included in this package +- [cURL](http://php.net/manual/en/book.curl.php), included in this package - [Guzzle](https://github.com/guzzle/guzzle), provided with [yii2-hiart-guzzle](https://github.com/hiqdev/yii2-hiart-guzzle) - [yii2-httpclient](https://github.com/yiisoft/yii2-httpclient), provided with [yii2-hiart-httpclient](https://github.com/hiqdev/yii2-hiart-httpclient) @@ -123,7 +124,7 @@ $user->save(); $admins = User::find()->where(['type' => User::ADMIN_TYPE])->all(); ``` -Basically all features of [Yii2 ActiveRecord] work if your API provides them. +Basically all the features of [Yii2 ActiveRecord] work if your API provides them. [Yii2 ActiveRecord]: http://www.yiiframework.com/doc-2.0/guide-db-active-record.html diff --git a/docs/readme/Configuration.md b/docs/readme/Configuration.md index c1db77b..97cc2ba 100644 --- a/docs/readme/Configuration.md +++ b/docs/readme/Configuration.md @@ -4,7 +4,7 @@ To use this extension, configure hiart component in your application config: 'components' => [ 'hiart' => [ 'class' => \hiqdev\hiart\rest\Connection::class, - 'requestClass' => \hiqdev\hiart\curl\Request::class, + 'requestClass' => \hiqdev\hiart\auto\Request::class, 'baseUri' => 'https://site.com/api/v3/', ], ], @@ -13,15 +13,16 @@ To use this extension, configure hiart component in your application config: Note three main options: - `class` specifies class that actually implements API to be accessed, **REST** in this case -- `requestClass` specifies transport implementation to be used, **cURL** in this case +- `requestClass` specifies transport implementation to be used, **auto** in this case - `baseUri` specifies starting point of the API ### Transports Available transports are: -- [PHP streams](http://php.net/manual/en/book.stream.php), **default**, included in this package -- [cURL](http://php.net/manual/en/book.curl.php), provided with [yii2-hiart-curl](https://github.com/hiqdev/yii2-hiart-curl) +- **auto** - auto detects best supported transport +- [PHP streams](http://php.net/manual/en/book.stream.php), the most generic fallback, included in this package +- [cURL](http://php.net/manual/en/book.curl.php), included in this package - [Guzzle](https://github.com/guzzle/guzzle), provided with [yii2-hiart-guzzle](https://github.com/hiqdev/yii2-hiart-guzzle) - [yii2-httpclient](https://github.com/yiisoft/yii2-httpclient), provided with [yii2-hiart-httpclient](https://github.com/hiqdev/yii2-hiart-httpclient) diff --git a/docs/readme/Usage.md b/docs/readme/Usage.md index 95e4bea..88b1e4f 100644 --- a/docs/readme/Usage.md +++ b/docs/readme/Usage.md @@ -28,6 +28,6 @@ $user->save(); $admins = User::find()->where(['type' => User::ADMIN_TYPE])->all(); ``` -Basically all features of [Yii2 ActiveRecord] work if your API provides them. +Basically all the features of [Yii2 ActiveRecord] work if your API provides them. [Yii2 ActiveRecord]: http://www.yiiframework.com/doc-2.0/guide-db-active-record.html