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

Commit f529fea

Browse files
committed
Merge branch 'hotfix/indentation'
Close #110
2 parents 4653814 + 51a18d9 commit f529fea

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

doc/book/container/factories.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ namespace, and define an `__invoke()` method that accepts an
1515
- **Suggested Name**: `Zend\Expressive\Application`
1616
- **Requires**: no additional services are required.
1717
- **Optional**:
18-
- `Zend\Expressive\Router\RouterInterface`. When provided, the service will
19-
be used to construct the `Application` instance; otherwise, an Aura router
20-
implementation will be used.
21-
- `Zend\Expressive\FinalHandler`. This is a meta-service, as the only concrete
22-
type required is a callable that can be used as a final middleware in the
23-
case that the stack is exhausted before execution ends. By default, an
24-
instance of `Zend\Stratigility\FinalHandler` will be used.
25-
- `Zend\Diactoros\Response\EmitterInterface`. If none is provided, an instance
26-
of `Zend\Expressive\Emitter\EmitterStack` composing a
27-
`Zend\Diactoros\Response\SapiEmitter` instance will be used.
28-
- `config`, an array or `ArrayAccess` instance. This will be used to seed the
29-
application instance with pre/post pipeline middleware and/or routed
30-
middleware (see more below).
18+
- `Zend\Expressive\Router\RouterInterface`. When provided, the service will
19+
be used to construct the `Application` instance; otherwise, an Aura router
20+
implementation will be used.
21+
- `Zend\Expressive\FinalHandler`. This is a meta-service, as the only concrete
22+
type required is a callable that can be used as a final middleware in the
23+
case that the stack is exhausted before execution ends. By default, an
24+
instance of `Zend\Stratigility\FinalHandler` will be used.
25+
- `Zend\Diactoros\Response\EmitterInterface`. If none is provided, an instance
26+
of `Zend\Expressive\Emitter\EmitterStack` composing a
27+
`Zend\Diactoros\Response\SapiEmitter` instance will be used.
28+
- `config`, an array or `ArrayAccess` instance. This will be used to seed the
29+
application instance with pre/post pipeline middleware and/or routed
30+
middleware (see more below).
3131

3232
Additionally, the container instance itself is injected into the `Application`
3333
instance.
@@ -92,35 +92,35 @@ order to seed the `Application` instance:
9292

9393
Each route *requires*:
9494

95-
- `path`: the path to match. Format will be based on the router you choose for
96-
your project.
97-
98-
- `middleware`: a callable or a service name for the middleware to execute
99-
when the route matches.
95+
- `path`: the path to match. Format will be based on the router you choose for
96+
your project.
97+
98+
- `middleware`: a callable or a service name for the middleware to execute
99+
when the route matches.
100100

101101
Optionally, the route definition may provide:
102102

103-
- `allowed_methods`: an array of allowed HTTP methods. If not provided, the
104-
application assumes any method is allowed.
105-
106-
- `name`: if not provided, the path will be used as the route name (and, if
107-
specific HTTP methods are allowed, a list of those).
108-
109-
- `options`: a key/value set of additional options to pass to the underlying
110-
router implementation for the given route. (Typical use cases include
111-
passing constraints or default values.)
103+
- `allowed_methods`: an array of allowed HTTP methods. If not provided, the
104+
application assumes any method is allowed.
105+
106+
- `name`: if not provided, the path will be used as the route name (and, if
107+
specific HTTP methods are allowed, a list of those).
108+
109+
- `options`: a key/value set of additional options to pass to the underlying
110+
router implementation for the given route. (Typical use cases include
111+
passing constraints or default values.)
112112

113113
## TemplatedErrorHandlerFactory
114114

115115
- **Provides**: `Zend\Expressive\TemplatedErrorHandler`
116116
- **Suggested Name**: `Zend\Expressive\FinalHandler`
117117
- **Requires**: no additional services are required.
118118
- **Optional**:
119-
- `Zend\Expressive\Template\TemplateInterface`. If not provided, the error
120-
handler will not use templated responses.
121-
- `config`, an array or `ArrayAccess` instance. This will be used to seed the
122-
`TemplatedErrorHandler` instance with template names to use for errors (see
123-
more below).
119+
- `Zend\Expressive\Template\TemplateInterface`. If not provided, the error
120+
handler will not use templated responses.
121+
- `config`, an array or `ArrayAccess` instance. This will be used to seed the
122+
`TemplatedErrorHandler` instance with template names to use for errors (see
123+
more below).
124124

125125
When the `config` service is present, the factory can utilize the
126126
`zend-expressive` top-level key, with the `error_handler` second-level key, to
@@ -140,14 +140,14 @@ seed the `Templated` instance:
140140
- **Provides**: `Zend\Expressive\TemplatedErrorHandler`
141141
- **Suggested Name**: `Zend\Expressive\FinalHandler`
142142
- **Requires**:
143-
- `Zend\Expressive\Whoops`, which should provide a `Whoops\Run` instance.
144-
- `Zend\Expressive\WhoopsPageHandler`, which should provide a
145-
`Whoops\Handler\PrettyPageHandler` instance.
143+
- `Zend\Expressive\Whoops`, which should provide a `Whoops\Run` instance.
144+
- `Zend\Expressive\WhoopsPageHandler`, which should provide a
145+
`Whoops\Handler\PrettyPageHandler` instance.
146146
- **Optional**:
147-
- `Zend\Expressive\Template\TemplateInterface`. If not provided, the error
148-
handler will not use templated responses.
149-
- `config`, an array or `ArrayAccess` instance. This will be used to seed the
150-
instance with template names to use for errors (see more below).
147+
- `Zend\Expressive\Template\TemplateInterface`. If not provided, the error
148+
handler will not use templated responses.
149+
- `config`, an array or `ArrayAccess` instance. This will be used to seed the
150+
instance with template names to use for errors (see more below).
151151

152152
This factory uses `config` in the same way as the
153153
`TemplatedErrorHandlerFactory`.
@@ -157,11 +157,11 @@ This factory uses `config` in the same way as the
157157
- **Provides**: `Whoops\Run`
158158
- **Suggested Name**: `Zend\Expressive\Whoops`
159159
- **Requires**:
160-
- `Zend\Expressive\WhoopsPageHandler`
160+
- `Zend\Expressive\WhoopsPageHandler`
161161
- **Optional**:
162-
- `config`, an array or `ArrayAccess` instance. This will be used to seed
163-
additional page handlers, specifically the `JsonResponseHandler` (see
164-
more below).
162+
- `config`, an array or `ArrayAccess` instance. This will be used to seed
163+
additional page handlers, specifically the `JsonResponseHandler` (see
164+
more below).
165165

166166
This factory creates and configures a `Whoops\Run` instance so that it will work
167167
properly with `Zend\Expressive\Application`; this includes disabling immediate
@@ -188,10 +188,10 @@ with no `JsonResponseHandler` composed will be created.
188188
- **Provides**: `Whoops\Handler\PrettyPageHandler`
189189
- **Suggested Name**: `Zend\Expressive\WhoopsPageHandler`
190190
- **Optional**:
191-
- `config`, an array or `ArrayAccess` instance. This will be used to further
192-
configure the `PrettyPageHandler` instance, specifically with editor
193-
configuration (for linking files such that they open in the configured
194-
editor).
191+
- `config`, an array or `ArrayAccess` instance. This will be used to further
192+
configure the `PrettyPageHandler` instance, specifically with editor
193+
configuration (for linking files such that they open in the configured
194+
editor).
195195

196196
It consumes the following `config` structure:
197197

0 commit comments

Comments
 (0)