Skip to content

Commit f0dcd76

Browse files
committed
Add link to documentation
1 parent 0755b38 commit f0dcd76

File tree

1 file changed

+2
-58
lines changed

1 file changed

+2
-58
lines changed

README.md

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -19,65 +19,9 @@ $ composer require php-http/discovery
1919
```
2020

2121

22-
## Usage
22+
## Documentation
2323

24-
Static containers to ease the auto initialization of objects.
25-
26-
Currently the following discovery strategies are available:
27-
28-
- Http Adapter discovery
29-
- Message Factory discovery
30-
- URI Factory discovery
31-
32-
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) and [Diactoros](https://github.com/zendframework/zend-diactoros))
49-
50-
``` php
51-
use Http\Discovery\MessageFactoryDiscovery;
52-
53-
MessageFactoryDiscovery::register('my_factory', 'My\Factory\Class', 'Psr\Request\Implementation\Class');
54-
55-
$factory = MessageFactoryDiscovery::find();
56-
```
57-
58-
59-
### URI Factory discovery
60-
61-
Two common URI factories are bundled with this package: ([Guzzle](https://github.com/guzzle/psr7) and [Diactoros](https://github.com/zendframework/zend-diactoros)).
62-
63-
``` php
64-
use Http\Discovery\UriFactoryDiscovery;
65-
66-
MessageFactoryDiscovery::register('my_factory', 'My\Factory\Class', 'Psr\Uri\Implementation\Class');
67-
68-
$factory = UriFactoryDiscovery::find();
69-
```
70-
71-
72-
### Custom conditions
73-
74-
You can use various types of conditions to check for a class:
75-
76-
- string (checked for class existence)
77-
- callable
78-
- boolean
79-
80-
Any further types are treated as invalid and evaulated to false boolean value.
24+
Please see the [official documentation](http://php-http.readthedocs.org/en/latest/discovery/).
8125

8226

8327
## Testing

0 commit comments

Comments
 (0)