You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/discovery.md
+12-9
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Discovery
2
2
3
-
The discovery service is a set of static classes which allows to find and use installed resources. This is especially useful when used with some virtual packages providing an implementation (`php-http/adapter-implementation`, `psr/http-message-implementation`).
3
+
The discovery service is a set of static classes which allows to find and use installed resources. This is useful in libraries that want to offer zero-configuration services and rely only on the virtual packages, e.g. `php-http/adapter-implementation` or `psr/http-message-implementation`.
4
4
5
5
6
6
Currently available discovery services:
@@ -9,14 +9,17 @@ Currently available discovery services:
9
9
- PSR-7 Message Factory Discovery
10
10
- PSR-7 URI Factory Discovery
11
11
12
-
The principle is always the same: you call a static find method if no explicit implementation was specified. Find will try to locate the service that is enabled. If no service is enabled, an `Http\Discovery\NotFoundException` is thrown.
12
+
The principle is always the same: you call the static `find` method on the discovery service if no explicit implementation was specified. The discovery service will try to locate a suitable implementation. If no implementation is found, an `Http\Discovery\NotFoundException` is thrown.
13
13
14
14
15
15
## HTTP Adapter Discovery
16
16
17
17
This type of discovery finds installed HTTP Adapters.
18
18
19
-
It is useful to provide zero-configuration for classes relying on an adapter:
0 commit comments