Rajout d'un fil RSS
[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                     'rss' => array(
164                         'type'    => 'Literal',
165                         'options' => array(
166                             'route'    => '/rss',
167                             'defaults' => array(
168                                 'action' => 'rss',
169                             ),
170                         ),
171                         'verb' => 'get',
172                     ),
173 /*
174                     'default' => array(
175                         'type'    => 'Segment',
176                         'options' => array(
177                             'route'    => '/[:controller[/:action]]',
178                             'constraints' => array(
179                                 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
180                                 'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
181                             ),
182                             'defaults' => array(
183                             ),
184                         ),
185                     ),*/
186                 ),
187             ),
188         ),
189     ),
190     'service_manager' => array( 
191         'factories' => array( 
192             'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', 
193         ), 
194     ), 
195     'translator' => array( 
196         'locale' => 'fr_FR', 
197         'translation_file_patterns' => array( 
198             array( 
199                 'type'     => 'gettext', 
200                 'base_dir' => __DIR__ . '/../language', 
201                 'pattern'  => '%s.mo', 
202                 'text_domain'  => 'galerie', 
203             ), 
204             array( 
205                 'type'     => 'phpArray', 
206                 'base_dir' => __DIR__ . '/../language/val', 
207                 'pattern'  => 'Zend_Validate_%s.php', 
208                 'text_domain'  => 'val', 
209             ), 
210         ), 
211     ), 
212     'mail' => array(
213         'name' => 'free',
214         'host' => 'smtp.free.fr',
215         'port' => 25,
216     ),
217     'rss' => array(
218         'title' => 'Galeries',
219         'description' => 'Liste des galeries disponibles',
220         'link' => 'http://zf2.biz/galeries',
221         'setfeedlink' => array(
222             'link' => 'http://zf2.biz/galeries/rss',
223             'type' => 'rss'
224         ),
225         'author' => array(
226             'name'  => 'Sébastien CHAZALLET',
227             'email' => 'contact@zf2.biz',
228             'uri'   => 'http://zf2.biz',
229         )
230     ),
231 );