498872820f411a073f1c1f4e0cfe5e5d0be304da
[zf2.biz/galerie.git] / module / Galerie / config / module.config.php
1 <?php
2
3 return array(
4     'controllers' => array(
5         'invokables' => array(
6             'Galerie\Controller\Index' =>
7                 'Galerie\Controller\IndexController'
8         ),
9     ),
10     'view_manager' => array(
11         'template_map' => array( 
12             'galerie/index/index' =>
13                         __DIR__ . '/../view/galerie/index/index.phtml', 
14             'galerie/index/edit' =>
15                         __DIR__ . '/../view/galerie/index/edit.phtml', 
16             'galerie/index/del' =>
17                         __DIR__ . '/../view/galerie/index/del.phtml', 
18             'galerie/index/view' =>
19                         __DIR__ . '/../view/galerie/index/view.phtml', 
20         ), 
21         'template_path_stack' => array(
22             'galerie' => __DIR__ . '/../view',
23         ),
24     ),
25     'router' => array(
26         'routes' => array(
27             'galerie' => array(
28                 'type'    => 'Literal',
29                 'options' => array(
30                     'route'    => '/galeries',
31                     'defaults' => array(
32                         '__NAMESPACE__' => 'Galerie\Controller',
33                         'controller'    => 'Index',
34                         'action'        => 'index',
35                     ),
36                 ),
37                 'verb' => 'get',
38                 'may_terminate' => true,
39                 'child_routes' => array(
40
41                     'add' => array(
42                         'type'    => 'Literal',
43                         'options' => array(
44                             'route'    => '/ajout',
45                             'defaults' => array(
46                                 'action' => 'edit',
47                             ),
48                         ),
49                         'verb' => 'get,post',
50                     ),
51                     'edit' => array(
52                         'type'    => 'Segment',
53                         'options' => array(
54                             'route'    => '/editer/:id',
55                             'constraints' => array(
56                                 'id' => '[1-9][0-9]*',
57                             ),
58                             'defaults' => array(
59                                 'action' => 'edit',
60                             ),
61                         ),
62                         'verb' => 'get,post',
63                     ),
64                     'del' => array(
65                         'type'    => 'Segment',
66                         'options' => array(
67                             'route'    => '/supprimer/:id',
68                             'constraints' => array(
69                                 'id' => '[1-9][0-9]*',
70                             ),
71                             'defaults' => array(
72                                 'action' => 'del',
73                             ),
74                         ),
75                         'verb' => 'get,post',
76                     ),
77                     'view' => array(
78                         'type'    => 'Segment',
79                         'options' => array(
80                             'route'    => '/voir/:id',
81                             'constraints' => array(
82                                 'id' => '[1-9][0-9]*',
83                             ),
84                             'defaults' => array(
85                                 'action' => 'view',
86                             ),
87                         ),
88                     ),
89                     'add_or_edit' => array(
90                         'type'    => 'Segment',
91                         'options' => array(
92                             'route'    => '/ajouter_editer/[:id]',
93                             'constraints' => array(
94                                 'id' => '[1-9][0-9]*',
95                             ),
96                             'defaults' => array(
97                                 'action' => 'edit',
98                                 'id' => null,
99                             ),
100                         ),
101                         'verb' => 'get,post',
102                     ),
103                     'default' => array(
104                         'type'    => 'Segment',
105                         'options' => array(
106                             'route'    => '/[:controller[/:action]]',
107                             'constraints' => array(
108                                 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
109                                 'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
110                             ),
111                             'defaults' => array(
112                             ),
113                         ),
114                     ),
115                 ),
116             ),
117         ),
118     ),
119 );