Fixing configuration according with changes done to router initializationThis change...
[zf2.biz/application_blanche.git] / module / Application / config / module.config.php
1 <?php
2 return array(
3     'layout'                => 'layout/layout.phtml',
4     'display_exceptions'    => true,
5     'di'                    => array(
6         'instance' => array(
7             'alias' => array(
8                 'index' => 'Application\Controller\IndexController',
9                 'error' => 'Application\Controller\ErrorController',
10                 'view'  => 'Zend\View\PhpRenderer',
11             ),
12             
13             // Inject the plugin broker for controller plugins into
14             // the action controller for use by all controllers that
15             // extend it.
16             'Zend\Mvc\Controller\ActionController' => array(
17                 'parameters' => array(
18                     'broker'       => 'Zend\Mvc\Controller\PluginBroker',
19                 ),
20             ),
21             'Zend\Mvc\Controller\PluginBroker' => array(
22                 'parameters' => array(
23                     'loader' => 'Zend\Mvc\Controller\PluginLoader',
24                 ),
25             ),
26
27             // Setup the PhpRenderer
28             'Zend\View\PhpRenderer' => array(
29                 'parameters' => array(
30                     'resolver' => 'Zend\View\TemplatePathStack',
31                     'options'  => array(
32                         'script_paths' => array(
33                             'application' => __DIR__ . '/../view',
34                         ),
35                     ),
36                 ),
37             ),
38             'Zend\Mvc\Router\RouteStack' => array(
39                 'parameters' => array(
40                     'routes' => array(
41                         'default' => array(
42                             'type'    => 'Zend\Mvc\Router\Http\Segment',
43                             'options' => array(
44                                 'route'    => '/[:controller[/:action]]',
45                                 'constraints' => array(
46                                     'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
47                                     'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
48                                 ),
49                                 'defaults' => array(
50                                     'controller' => 'index',
51                                     'action'     => 'index',
52                                 ),
53                             ),
54                         ),
55                         'home' => array(
56                             'type' => 'Zend\Mvc\Router\Http\Literal',
57                             'options' => array(
58                                 'route'    => '/',
59                                 'defaults' => array(
60                                     'controller' => 'index',
61                                     'action'     => 'index',
62                                 ),
63                             ),
64                         ),
65                     ),
66                 ),
67             ),
68         ),
69     ),
70 );