21c80cc4ebbe23096bac194c27dab31c0e88f631
[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     'controller_plugins' => array(
11         'invokables' => array(
12             'MessageGetter' =>
13                 'Custom\Mvc\Controller\Plugin\MessageGetter',
14         ),
15     ),
16     'view_manager' => array(
17         'template_map' => array( 
18             'galerie/index/index' =>
19                         __DIR__ . '/../view/galerie/index/index.phtml', 
20             'galerie/index/edit' =>
21                         __DIR__ . '/../view/galerie/index/edit.phtml', 
22             'galerie/index/del' =>
23                         __DIR__ . '/../view/galerie/index/del.phtml', 
24             'galerie/index/view' =>
25                         __DIR__ . '/../view/galerie/index/view.phtml', 
26         ), 
27         'template_path_stack' => array(
28             'galerie' => __DIR__ . '/../view',
29         ),
30         'strategies' => array(
31             'ViewJsonStrategy',
32         ),
33     ),
34     'router' => array(
35         'routes' => array(
36             'galerie' => array(
37                 'type'    => 'Literal',
38                 'options' => array(
39                     'route'    => '/galeries',
40                     'defaults' => array(
41                         '__NAMESPACE__' => 'Galerie\Controller',
42                         'controller'    => 'Index',
43                         'action'        => 'index',
44                     ),
45                 ),
46                 'verb' => 'get',
47                 'may_terminate' => true,
48                 'child_routes' => array(
49                     'add' => array(
50                         'type'    => 'Literal',
51                         'options' => array(
52                             'route'    => '/ajout',
53                             'defaults' => array(
54                                 'action' => 'edit',
55                             ),
56                         ),
57                         'verb' => 'get,post',
58                     ),
59                     'edit' => array(
60                         'type'    => 'Segment',
61                         'options' => array(
62                             'route'    => '/editer/:id',
63                             'constraints' => array(
64                                 'id' => '[1-9][0-9]*',
65                             ),
66                             'defaults' => array(
67                                 'action' => 'edit',
68                             ),
69                         ),
70                         'verb' => 'get,post',
71                     ),
72                     'del' => array(
73                         'type'    => 'Segment',
74                         'options' => array(
75                             'route'    => '/supprimer/:id',
76                             'constraints' => array(
77                                 'id' => '[1-9][0-9]*',
78                             ),
79                             'defaults' => array(
80                                 'action' => 'del',
81                             ),
82                         ),
83                         'verb' => 'get,post',
84                     ),
85                     'view' => array(
86                         'type'    => 'Segment',
87                         'options' => array(
88                             'route'    => '/voir/:id',
89                             'constraints' => array(
90                                 'id' => '[1-9][0-9]*',
91                             ),
92                             'defaults' => array(
93                                 'action' => 'view',
94                             ),
95                         ),
96                     ),
97                     'add_or_edit' => array(
98                         'type'    => 'Segment',
99                         'options' => array(
100                             'route'    => '/ajouter_editer/[:id]',
101                             'constraints' => array(
102                                 'id' => '[1-9][0-9]*',
103                             ),
104                             'defaults' => array(
105                                 'action' => 'edit',
106                                 'id' => null,
107                             ),
108                         ),
109                         'verb' => 'get,post',
110                     ),
111                     'list' => array(
112                         'type'    => 'Literal',
113                         'options' => array(
114                             'route'    => '/liste',
115                             'defaults' => array(
116                                 'action' => 'list',
117                             ),
118                         ),
119                         'verb' => 'get',
120                     ),
121                     'csv' => array(
122                         'type'    => 'Literal',
123                         'options' => array(
124                             'route'    => '/csv',
125                             'defaults' => array(
126                                 'action' => 'csv',
127                             ),
128                         ),
129                         'verb' => 'get',
130                     ),
131                     'excel' => array(
132                         'type'    => 'Literal',
133                         'options' => array(
134                             'route'    => '/excel',
135                             'defaults' => array(
136                                 'action' => 'excel',
137                             ),
138                         ),
139                         'verb' => 'get',
140                     ),
141 /*
142                     'default' => array(
143                         'type'    => 'Segment',
144                         'options' => array(
145                             'route'    => '/[:controller[/:action]]',
146                             'constraints' => array(
147                                 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
148                                 'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
149                             ),
150                             'defaults' => array(
151                             ),
152                         ),
153                     ),*/
154                 ),
155             ),
156         ),
157     ),
158     'service_manager' => array( 
159         'factories' => array( 
160             'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', 
161         ), 
162     ), 
163     'translator' => array( 
164         'locale' => 'fr_FR', 
165         'translation_file_patterns' => array( 
166             array( 
167                 'type'     => 'gettext', 
168                 'base_dir' => __DIR__ . '/../language', 
169                 'pattern'  => '%s.mo', 
170                 'text_domain'  => 'galerie', 
171             ), 
172             array( 
173                 'type'     => 'phpArray', 
174                 'base_dir' => __DIR__ . '/../language/val', 
175                 'pattern'  => 'Zend_Validate_%s.php', 
176                 'text_domain'  => 'val', 
177             ), 
178         ), 
179     ), 
180 );