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