Answer the question
In order to leave comments, you need to log in
How to use the PSR-18 correctly?
Maybe someone has already met a package where you can borrow an example of using PSR-18?
Let's say you need to write a simple package to check the availability of goods in online stores. Each store provides its own API, i.e. the request and its parameters will be different for each store.
src/
- Providers
-- AbstractProvider.php
-- Shop1Provider.php
-- Shop2Provider.php
- ProviderInerface.php
- ProviderBuilder.php
Answer the question
In order to leave comments, you need to log in
How to use the PSR-18 correctly?
$client = new HttpClientWithPsr18();
$client->sendRequest(new RequestFromPSR7());
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question