Fixes for helper loader/broker configuration
[zf2.biz/galerie.git] / module / Application / config / module.config.php
1 <?php
2 return array(
3     'di' => array(
4         'instance' => array(
5             // Inject the plugin broker for controller plugins into
6             // the action controller for use by all controllers that
7             // extend it.
8             'Zend\Mvc\Controller\ActionController' => array(
9                 'parameters' => array(
10                     'broker'       => 'Zend\Mvc\Controller\PluginBroker',
11                 ),
12             ),
13             'Zend\Mvc\Controller\PluginBroker' => array(
14                 'parameters' => array(
15                     'loader' => 'Zend\Mvc\Controller\PluginLoader',
16                 ),
17             ),
18
19             // Setup the View layer
20             'Zend\View\Resolver\TemplatePathStack' => array(
21                 'parameters' => array(
22                     'paths'  => array(
23                         'application' => __DIR__ . '/../view',
24                     ),
25                 ),
26             ),
27             'Zend\View\Renderer\PhpRenderer' => array(
28                 'parameters' => array(
29                     'resolver' => 'Zend\View\Resolver\TemplatePathStack',
30                 ),
31             ),
32             'Zend\Mvc\View\DefaultRenderingStrategy' => array(
33                 'parameters' => array(
34                     'baseTemplate' => 'layout/layout',
35                 ),
36             ),
37             'Zend\Mvc\View\ExceptionStrategy' => array(
38                 'parameters' => array(
39                     'displayExceptions' => true,
40                     'template'          => 'error/index',
41                 ),
42             ),
43             'Zend\Mvc\View\RouteNotFoundStrategy' => array(
44                 'parameters' => array(
45                     'notFoundTemplate' => 'error/404',
46                 ),
47             ),
48
49             // Setup the router and routes
50             'Zend\Mvc\Router\RouteStack' => array(
51                 'parameters' => array(
52                     'routes' => array(
53                         'default' => array(
54                             'type'    => 'Zend\Mvc\Router\Http\Segment',
55                             'options' => array(
56                                 'route'    => '/[:controller[/:action]]',
57                                 'constraints' => array(
58                                     'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
59                                     'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
60                                 ),
61                                 'defaults' => array(
62                                     'controller' => 'Application\Controller\IndexController',
63                                     'action'     => 'index',
64                                 ),
65                             ),
66                         ),
67                         'home' => array(
68                             'type' => 'Zend\Mvc\Router\Http\Literal',
69                             'options' => array(
70                                 'route'    => '/',
71                                 'defaults' => array(
72                                     'controller' => 'Application\Controller\IndexController',
73                                     'action'     => 'index',
74                                 ),
75                             ),
76                         ),
77                     ),
78                 ),
79             ),
80         ),
81     ),
82 );