Skip to content

Commit d91e14a

Browse files
committed
Updates documentation
1 parent 7493eb0 commit d91e14a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,32 @@ Currently the following discovery strategies are available:
3030
- Message Factory discovery
3131

3232

33+
### Http Adapter discovery
34+
35+
HTTP Adapters provided by us are registered in the discovery by default.
36+
37+
``` php
38+
use Http\Discovery\HttpAdapterDiscovery;
39+
40+
HttpAdapterDiscovery::register('my_adapter', 'My\Adapter\Class');
41+
42+
$adapter = HttpAdapterDiscovery::find();
43+
```
44+
45+
46+
### Message Factory discovery
47+
48+
Two common message factories are bundled with this package. ([Guzzle](https://github.com/guzzle/psr7), [Diactoros](https://github.com/zendframework/zend-diactoros))
49+
50+
``` php
51+
use Http\Discovery\MessageFactoryDiscovery;
52+
53+
MessageFactoryDiscovery::register('my_factory', 'Psr\Request\Implementation\Class', 'My\Factory\Class');
54+
55+
$adapter = MessageFactoryDiscovery::find();
56+
```
57+
58+
3359
## Testing
3460

3561
``` bash

0 commit comments

Comments
 (0)