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
{{ message }}
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
Added a couple of necessary `use` statements. See here for an example of this technique including an example of the use of `host()` middleware that adds a base path before segregating by that path.
Copy file name to clipboardExpand all lines: docs/book/cookbook/path-segregated-uri-generation.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
You may want to develop your API as a separate module that you can then drop in
6
6
to an existing application; you may even want to [path-segregate](https://docs.zendframework.com/zend-expressive/v3/features/router/piping/#path-segregation) it.
7
7
8
-
In such cases, you will want to use a different router instance, which has a
8
+
In such cases, you will want to use a different router instance to isolate your routes, which has a
9
9
huge number of ramifications:
10
10
11
11
- You'll need separate routing middleware.
@@ -49,6 +49,7 @@ use Zend\Expressive\Helper\UrlHelperFactory;
49
49
use Zend\Expressive\Helper\UrlHelperMiddlewareFactory;
50
50
use Zend\Expressive\Router\FastRouteRouter;
51
51
use Zend\Expressive\Router\Middleware\RouteMiddlewareFactory;
52
+
use Zend\Expressive\Router\FastRouteRouterFactory;
52
53
53
54
class ConfigProvider
54
55
{
@@ -213,6 +214,7 @@ namespace Api;
213
214
use Psr\Container\ContainerInterface;
214
215
use Zend\Expressive\MiddlewareFactory;
215
216
use Zend\Expressive\Router\Middleware as RouterMiddleware;
217
+
use Zend\Expressive\Router\RouteCollector;
216
218
use Zend\ProblemDetails\ProblemDetailsMiddleware;
217
219
use Zend\ProblemDetails\ProblemDetailsNotFoundHandler;
0 commit comments