Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 41295ab

Browse files
committed
Updated documentation to reference correct namespace
`RouteResultObserverInterface` is now under the `Zend\Expressive\Router` namespace.
1 parent b374268 commit 41295ab

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

doc/book/router/result-observers.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ you to notify such utilities of the results of matching.
2121
Route result observers must implement the `RouteResultObserverInterface`:
2222

2323
```php
24-
namespace Zend\Expressive;
24+
namespace Zend\Expressive\Router;
2525

2626
use Zend\Expressive\Router\RouteResult;
2727

@@ -52,6 +52,16 @@ You can detach an existing observer as well, by passing its instance to the
5252
$app->detachRouteResultObserver($observer);
5353
```
5454

55+
> ### RouteResultSubjectInterface
56+
>
57+
> `Zend\Expressive\Application` implements `Zend\Expressive\Router\RouteResultSubjectInterface`,
58+
> which defines methods for attaching and detaching route result observers, as
59+
> well as a method for notifying observers. Typically you'll only see the
60+
> `Application` class as an implementation of the interface, but you can always
61+
> create your own implementations as well if desired — for instance, if
62+
> you are implementing your own middleware runtime using the various interfaces
63+
> Expressive provides.
64+
5565
## Example
5666

5767
For this example, we'll build a simple URI generator. It will compose a
@@ -61,7 +71,7 @@ when invoked, generate a URI.
6171
```php
6272
use Zend\Expressive\Router\RouterInterface;
6373
use Zend\Expressive\Router\RouteResult;
64-
use Zend\Expressive\RouteResultObserverInterface;
74+
use Zend\Expressive\ROuter\RouteResultObserverInterface;
6575

6676
class UriGenerator implements RouteResultObserverInterface
6777
{

0 commit comments

Comments
 (0)