thgs / laminas-feed-amphp-adapter
An adapter to use Amphp HTTP client in Laminas Feed
v1.1.0
2024-02-19 15:02 UTC
Requires
- php: >=8.1
- amphp/http-client: ^5
- laminas/laminas-feed: ^2
Requires (Dev)
- amphp/php-cs-fixer-config: ^2.0
- phpunit/phpunit: ^9
- psalm/phar: ^5.20
This package is auto-updated.
Last update: 2024-12-19 17:58:14 UTC
README
This package provides an adapter to use Amphp HTTP Client with Laminas Feed.
Usage
There is a convenience static method provided to create and install the adapter
<?php use thgs\Adapter\LaminasFeedHttpClient\LaminasFeedAmphpHttpClientAdapter; LaminasFeedAmphpHttpClientAdapter::installNew($httpClient = null);
If an HttpClient
is not passed to installNew
a default one will be
created.
If you prefer to manually install into Laminas Feed
you may use the constructor.
<?php use thgs\Adapter\LaminasFeedHttpClient\LaminasFeedAmphpHttpClientAdapter; $adapter = new LaminasFeedAmphpHttpClientAdapter($httpClient = null); \Laminas\Feed\Reader\Reader::setHttpClient($adapter);