5f965699c641ff1c492e25da9b24f5ade84fb65e
[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 /*
132                     'default' => array(
133                         'type'    => 'Segment',
134                         'options' => array(
135                             'route'    => '/[:controller[/:action]]',
136                             'constraints' => array(
137                                 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
138                                 'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
139                             ),
140                             'defaults' => array(
141                             ),
142                         ),
143                     ),*/
144                 ),
145             ),
146         ),
147     ),
148     'service_manager' => array( 
149         'factories' => array( 
150             'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', 
151         ), 
152     ), 
153     'translator' => array( 
154         'locale' => 'fr_FR', 
155         'translation_file_patterns' => array( 
156             array( 
157                 'type'     => 'gettext', 
158                 'base_dir' => __DIR__ . '/../language', 
159                 'pattern'  => '%s.mo', 
160                 'text_domain'  => 'galerie', 
161             ), 
162             array( 
163                 'type'     => 'phpArray', 
164                 'base_dir' => __DIR__ . '/../language/val', 
165                 'pattern'  => 'Zend_Validate_%s.php', 
166                 'text_domain'  => 'val', 
167             ), 
168         ), 
169     ), 
170 );