X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FApplication%2Fconfig%2Fmodule.config.php;h=124e37c416841d525cf069ac8073078b1660849b;hb=88f96187c3782f2359ff9f557b64549d63a360dc;hp=9f266c0c1a037b3c1327978023705cfc10094b9c;hpb=fb614285fa9223fd3a9b2a1c6a7c694276c4b0d4;p=zf2.biz%2Fgalerie.git diff --git a/module/Application/config/module.config.php b/module/Application/config/module.config.php index 9f266c0..124e37c 100644 --- a/module/Application/config/module.config.php +++ b/module/Application/config/module.config.php @@ -1,49 +1,83 @@ 'layouts/layout.phtml', - 'di' => array( - 'instance' => array( - 'alias' => array( - 'index' => 'Application\Controller\IndexController', - 'error' => 'Application\Controller\ErrorController', - 'view' => 'Zend\View\PhpRenderer', + 'router' => array( + 'routes' => array( + 'home' => array( + 'type' => 'Zend\Mvc\Router\Http\Literal', + 'options' => array( + 'route' => '/', + 'defaults' => array( + 'controller' => 'Application\Controller\Index', + 'action' => 'index', + ), + ), ), - 'Zend\View\PhpRenderer' => array( - 'parameters' => array( - 'resolver' => 'Zend\View\TemplatePathStack', - 'options' => array( - 'script_paths' => array( - 'application' => __DIR__ . '/../views', + // The following is a route to simplify getting started creating + // new controllers and actions without needing to create a new + // module. Simply drop new controllers in, and you can access them + // using the path /application/:controller/:action + 'application' => array( + 'type' => 'Literal', + 'options' => array( + 'route' => '/application', + 'defaults' => array( + '__NAMESPACE__' => 'Application\Controller', + 'controller' => 'Index', + 'action' => 'index', + ), + ), + 'may_terminate' => true, + 'child_routes' => array( + '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( + ), ), ), ), ), ), ), - 'routes' => array( - 'default' => array( - 'type' => 'Zend\Mvc\Router\Http\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( - 'controller' => 'index', - 'action' => 'index', - ), - ), + 'service_manager' => array( + 'factories' => array( + 'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', ), - 'home' => array( - 'type' => 'Zend\Mvc\Router\Http\Literal', - 'options' => array( - 'route' => '/', - 'defaults' => array( - 'controller' => 'index', - 'action' => 'index', - ), + ), + 'translator' => array( + 'locale' => 'en_US', + 'translation_patterns' => array( + array( + 'type' => 'gettext', + 'base_dir' => __DIR__ . '/../language', + 'pattern' => '%s.mo', ), ), ), + 'controllers' => array( + 'invokables' => array( + 'Application\Controller\Index' => 'Application\Controller\IndexController' + ), + ), + 'view_manager' => array( + 'display_not_found_reason' => true, + 'display_exceptions' => true, + 'doctype' => 'HTML5', + 'not_found_template' => 'error/404', + 'exception_template' => 'error/index', + 'template_map' => array( + 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', + 'application/index/index' => __DIR__ . '/../view/application/index/index.phtml', + 'error/404' => __DIR__ . '/../view/error/404.phtml', + 'error/index' => __DIR__ . '/../view/error/index.phtml', + ), + 'template_path_stack' => array( + __DIR__ . '/../view', + ), + ), );