7 // Defining how the router should be instantiated. The minimum
8 // requirement is to implement interface
9 // Zend\Mvc\Router\RouteStack. Here we are stating that
10 // Zend\Mvc\Router\Http\TreeRouteStack::factory should generate
11 // an instance of it. This can be changed to instantiate a
13 'Zend\Mvc\Router\RouteStack' => array(
14 'instantiator' => array(
15 'Zend\Mvc\Router\Http\TreeRouteStack',
24 // Setup for controllers.
26 // Injecting the plugin broker for controller plugins into
27 // the action controller for use by all controllers that
29 'Zend\Mvc\Controller\ActionController' => array(
30 'parameters' => array(
31 'broker' => 'Zend\Mvc\Controller\PluginBroker',
34 'Zend\Mvc\Controller\PluginBroker' => array(
35 'parameters' => array(
36 'loader' => 'Zend\Mvc\Controller\PluginLoader',
40 // Setup for router and routes
41 'Zend\Mvc\Router\RouteStack' => array(
42 'parameters' => array(
45 'type' => 'Zend\Mvc\Router\Http\Segment',
47 'route' => '/[:controller[/:action]]',
48 'constraints' => array(
49 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
50 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
53 'controller' => 'Application\Controller\IndexController',
59 'type' => 'Zend\Mvc\Router\Http\Literal',
63 'controller' => 'Application\Controller\IndexController',
72 // Setup for the view layer.
74 // Using the PhpRenderer, which just handles html produced by php
76 'Zend\View\Renderer\PhpRenderer' => array(
77 'parameters' => array(
78 'resolver' => 'Zend\View\Resolver\AggregateResolver',
81 // Defining how the view scripts should be resolved by stacking up
82 // a Zend\View\Resolver\TemplateMapResolver and a
83 // Zend\View\Resolver\TemplatePathStack
84 'Zend\View\Resolver\AggregateResolver' => array(
85 'injections' => array(
86 'Zend\View\Resolver\TemplateMapResolver',
87 'Zend\View\Resolver\TemplatePathStack',
90 // Defining where the layout/layout view should be located
91 'Zend\View\Resolver\TemplateMapResolver' => array(
92 'parameters' => array(
94 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
98 // Defining where to look for views. This works with multiple paths,
99 // very similar to include_path
100 'Zend\View\Resolver\TemplatePathStack' => array(
101 'parameters' => array(
103 'application' => __DIR__ . '/../view',
107 // View for the layout
108 'Zend\Mvc\View\DefaultRenderingStrategy' => array(
109 'parameters' => array(
110 'layoutTemplate' => 'layout/layout',
113 // Injecting the router into the url helper
114 'Zend\View\Helper\Url' => array(
115 'parameters' => array(
116 'router' => 'Zend\Mvc\Router\RouteStack',
119 // Configuration for the doctype helper
120 'Zend\View\Helper\Doctype' => array(
121 'parameters' => array(
122 'doctype' => 'HTML5',
125 // View script rendered in case of 404 exception
126 'Zend\Mvc\View\RouteNotFoundStrategy' => array(
127 'parameters' => array(
128 'displayNotFoundReason' => true,
129 'displayExceptions' => true,
130 'notFoundTemplate' => 'error/404',
133 // View script rendered in case of other exceptions
134 'Zend\Mvc\View\ExceptionStrategy' => array(
135 'parameters' => array(
136 'displayExceptions' => true,
137 'exceptionTemplate' => 'error/index',