6 // Setup for controllers.
8 // Injecting the plugin broker for controller plugins into
9 // the action controller for use by all controllers that
11 'Zend\Mvc\Controller\ActionController' => array(
12 'parameters' => array(
13 'broker' => 'Zend\Mvc\Controller\PluginBroker',
16 'Zend\Mvc\Controller\PluginBroker' => array(
17 'parameters' => array(
18 'loader' => 'Zend\Mvc\Controller\PluginLoader',
22 // Setup for router and routes
23 'Zend\Mvc\Router\RouteStack' => array(
24 'parameters' => array(
27 'type' => 'Zend\Mvc\Router\Http\Segment',
29 'route' => '/[:controller[/:action]]',
30 'constraints' => array(
31 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
32 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
35 'controller' => 'Application\Controller\IndexController',
41 'type' => 'Zend\Mvc\Router\Http\Literal',
45 'controller' => 'Application\Controller\IndexController',
54 // Setup for the view layer.
56 // Using the PhpRenderer, which just handles html produced by php
58 'Zend\View\Renderer\PhpRenderer' => array(
59 'parameters' => array(
60 'resolver' => 'Zend\View\Resolver\AggregateResolver',
63 // Defining how the view scripts should be resolved by stacking up
64 // a Zend\View\Resolver\TemplateMapResolver and a
65 // Zend\View\Resolver\TemplatePathStack
66 'Zend\View\Resolver\AggregateResolver' => array(
67 'injections' => array(
68 'Zend\View\Resolver\TemplateMapResolver',
69 'Zend\View\Resolver\TemplatePathStack',
72 // Defining where the layout/layout view should be located
73 'Zend\View\Resolver\TemplateMapResolver' => array(
74 'parameters' => array(
76 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
80 // Defining where to look for views. This works with multiple paths,
81 // very similar to include_path
82 'Zend\View\Resolver\TemplatePathStack' => array(
83 'parameters' => array(
85 'application' => __DIR__ . '/../view',
89 // View for the layout
90 'Zend\Mvc\View\DefaultRenderingStrategy' => array(
91 'parameters' => array(
92 'layoutTemplate' => 'layout/layout',
95 // Injecting the router into the url helper
96 'Zend\View\Helper\Url' => array(
97 'parameters' => array(
98 'router' => 'Zend\Mvc\Router\RouteStack',
101 // Configuration for the doctype helper
102 'Zend\View\Helper\Doctype' => array(
103 'parameters' => array(
104 'doctype' => 'HTML5',
107 // View script rendered in case of 404 exception
108 'Zend\Mvc\View\RouteNotFoundStrategy' => array(
109 'parameters' => array(
110 'displayNotFoundReason' => true,
111 'displayExceptions' => true,
112 'notFoundTemplate' => 'error/404',
115 // View script rendered in case of other exceptions
116 'Zend\Mvc\View\ExceptionStrategy' => array(
117 'parameters' => array(
118 'displayExceptions' => true,
119 'exceptionTemplate' => 'error/index',