X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FGalerie%2Fconfig%2Fmodule.config.php;h=c760d83d0efbc7d864a9db5a38bb03df5796778a;hb=0e50f86e2a2842121f7053983dcf6d326786f770;hp=c8d1b4091c50c8d3b585e69eca2a52fd5a74d662;hpb=39d476c1cb28352c6170843945a1ff7221db5716;p=zf2.biz%2Fgalerie.git diff --git a/module/Galerie/config/module.config.php b/module/Galerie/config/module.config.php index c8d1b40..c760d83 100644 --- a/module/Galerie/config/module.config.php +++ b/module/Galerie/config/module.config.php @@ -4,7 +4,13 @@ return array( 'controllers' => array( 'invokables' => array( 'Galerie\Controller\Index' => - 'Galerie\Controller\IndexController' + 'Galerie\Controller\IndexController', + ), + ), + 'controller_plugins' => array( + 'invokables' => array( + 'MessageGetter' => + 'Custom\Mvc\Controller\Plugin\MessageGetter', ), ), 'view_manager' => array( @@ -16,11 +22,16 @@ return array( 'galerie/index/del' => __DIR__ . '/../view/galerie/index/del.phtml', 'galerie/index/view' => - __DIR__ . '/../view/galerie/index/view.phtml', + __DIR__ . '/../view/galerie/index/view.phtml', + 'galerie/mail/test' => + __DIR__ . '/../view/galerie/mail/test.phtml', ), 'template_path_stack' => array( 'galerie' => __DIR__ . '/../view', ), + 'strategies' => array( + 'ViewJsonStrategy', + ), ), 'router' => array( 'routes' => array( @@ -36,7 +47,151 @@ return array( ), 'verb' => 'get', 'may_terminate' => true, + 'child_routes' => array( + 'add' => array( + 'type' => 'Literal', + 'options' => array( + 'route' => '/ajout', + 'defaults' => array( + 'action' => 'edit', + ), + ), + 'verb' => 'get,post', + ), + 'edit' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/editer/:id', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'edit', + ), + ), + 'verb' => 'get,post', + ), + 'del' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/supprimer/:id', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'del', + ), + ), + 'verb' => 'get,post', + ), + 'view' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/voir/:id', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'view', + ), + ), + ), + 'add_or_edit' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/ajouter_editer/[:id]', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'edit', + 'id' => null, + ), + ), + 'verb' => 'get,post', + ), + 'list' => array( + 'type' => 'Literal', + 'options' => array( + 'route' => '/liste', + 'defaults' => array( + 'action' => 'list', + ), + ), + 'verb' => 'get', + ), + 'csv' => array( + 'type' => 'Literal', + 'options' => array( + 'route' => '/csv', + 'defaults' => array( + 'action' => 'csv', + ), + ), + 'verb' => 'get', + ), + 'excel' => array( + 'type' => 'Literal', + 'options' => array( + 'route' => '/excel', + 'defaults' => array( + 'action' => 'excel', + ), + ), + 'verb' => 'get', + ), + 'mail' => array( + 'type' => 'Literal', + 'options' => array( + 'route' => '/mail', + 'defaults' => array( + 'action' => 'mail', + ), + ), + 'verb' => 'get', + ), +/* + 'default' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/[:controller[/:action]]', + 'constraints' => array( + 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', + 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', + ), + 'defaults' => array( + ), + ), + ),*/ + ), ), ), ), + 'service_manager' => array( + 'factories' => array( + 'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', + ), + ), + 'translator' => array( + 'locale' => 'fr_FR', + 'translation_file_patterns' => array( + array( + 'type' => 'gettext', + 'base_dir' => __DIR__ . '/../language', + 'pattern' => '%s.mo', + 'text_domain' => 'galerie', + ), + array( + 'type' => 'phpArray', + 'base_dir' => __DIR__ . '/../language/val', + 'pattern' => 'Zend_Validate_%s.php', + 'text_domain' => 'val', + ), + ), + ), + 'mail' => array( + 'name' => 'free', + 'host' => 'smtp.free.fr', + 'port' => 25, + ), );