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