@@ -203,3 +203,107 @@ It consumes the following `config` structure:
203203
204204The ` editor ` value must be a known editor name (see the Whoops documentation for
205205pre-configured editor types), a callable, or a service name to use.
206+
207+ ## PlatesFactory
208+
209+ - ** Provides** : ` Zend\Expressive\Template\Plates `
210+ - ** FactoryName** : ` Zend\Expressive\Container\Template\PlatesFactory `
211+ - ** Suggested Name** : ` Zend\Expressive\Template\TemplateInterface `
212+ - ** Requires** : no additional services are required.
213+ - ** Optional** :
214+ - ` config ` , an array or ` ArrayAccess ` instance. This will be used to further
215+ configure the ` Plates ` instance, specifically with the filename extension
216+ to use, and paths to inject.
217+
218+ It consumes the following ` config ` structure:
219+
220+ ``` php
221+ 'templates' => [
222+ 'extension' => 'file extension used by templates; defaults to html',
223+ 'paths' => [
224+ // namespace / path pairs
225+ //
226+ // Numeric namespaces imply the default/main namespace. Paths may be
227+ // strings or arrays of string paths to associate with the namespace.
228+ ],
229+ ]
230+ ```
231+
232+ One note: Due to a limitation in the Plates engine, you can only map one path
233+ per namespace when using Plates.
234+
235+ ## TwigFactory
236+
237+ - ** Provides** : ` Zend\Expressive\Template\Twig `
238+ - ** FactoryName** : ` Zend\Expressive\Container\Template\TwigFactory `
239+ - ** Suggested Name** : ` Zend\Expressive\Template\TemplateInterface `
240+ - ** Requires** : no additional services are required.
241+ - ** Optional** :
242+ - ` Zend\Expressive\Router\RouterInterface ` ; if found, it will be used to
243+ seed a ` Zend\Expressive\Template\Twig\TwigExtension ` instance for purposes
244+ of rendering application URLs.
245+ - ` config ` , an array or ` ArrayAccess ` instance. This will be used to further
246+ configure the ` Twig ` instance, specifically with the filename extension,
247+ paths to assets (and default asset version to use), and template paths to
248+ inject.
249+
250+ It consumes the following ` config ` structure:
251+
252+ ``` php
253+ 'debug' => boolean,
254+ 'templates' => [
255+ 'cache_dir' => 'path to cached templates',
256+ 'assets_url' => 'base URL for assets',
257+ 'assets_version' => 'base version for assets',
258+ 'extension' => 'file extension used by templates; defaults to html.twig',
259+ 'paths' => [
260+ // namespace / path pairs
261+ //
262+ // Numeric namespaces imply the default/main namespace. Paths may be
263+ // strings or arrays of string paths to associate with the namespace.
264+ ],
265+ ]
266+ ```
267+
268+ Whe ` debug ` is true, it disables caching, enables debug mode, enables strict
269+ variables, and enables auto reloading. The ` assets_* ` values are used to seed
270+ the ` TwigExtension ` instance (assuming the router was found).
271+
272+ ## ZendViewFactory
273+
274+ - ** Provides** : ` Zend\Expressive\Template\ZendView `
275+ - ** FactoryName** : ` Zend\Expressive\Container\Template\ZendViewFactory `
276+ - ** Suggested Name** : ` Zend\Expressive\Template\TemplateInterface `
277+ - ** Requires** : no additional services are required.
278+ - ` Zend\Expressive\Router\RouterInterface ` , in order to inject the custom
279+ url helper implementation.
280+ - ** Optional** :
281+ - ` config ` , an array or ` ArrayAccess ` instance. This will be used to further
282+ configure the ` ZendView ` instance, specifically with the layout template
283+ name, entries for a ` TemplateMapResolver ` , and and template paths to
284+ inject.
285+ - ` Zend\View\HelperPluginManager ` ; if present, will be used to inject the
286+ ` PhpRenderer ` instance.
287+
288+ It consumes the following ` config ` structure:
289+
290+ ``` php
291+ 'templates' => [
292+ 'layout' => 'name of layout view to use, if any',
293+ 'map' => [
294+ // template => filename pairs
295+ ],
296+ 'paths' => [
297+ // namespace / path pairs
298+ //
299+ // Numeric namespaces imply the default/main namespace. Paths may be
300+ // strings or arrays of string paths to associate with the namespace.
301+ ],
302+ ]
303+ ```
304+
305+ When creating the ` PhpRenderer ` instance, it will inject it with a
306+ ` Zend\View\HelperPluginManager ` instance (either pulled from the container, or
307+ instantiated directly). It injects the helper plugin manager with custom url and
308+ serverurl helpers, ` Zend\Expressive\Template\ZendView\UrlHelper ` and
309+ ` Zend\Expressive\Template\ZendView\ServerUrlHelper ` , respetively.
0 commit comments