westdc-zf1/module/Application/config/module.config.php

211 lines
6.6 KiB
PHP

<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
return array(
'router' => array(
'routes' => array(
//home
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
//'type' => 'Segment',
'options' => array(
'route' => '/',
'defaults' => array(
'module' => 'Application',
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Application\Controller\Index',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '[:controller[/:action][/]]',
'constraints' => array(
'module' => 'Application',
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'module' => 'Application',
'action' => 'index',
'__NAMESPACE__' => 'Application\Controller',
),
),
'may_terminate' => true,
'child_routes' => array(
'wildcard' => array(
'type' => 'Wildcard'
)
)
),//default
'about' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => 'about',
'defaults' => array(
'module' => 'Application',
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Application\Controller\Index',
'action' => 'about',
),
),
),
),
),//home
//login
'login' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/account/login',
'defaults' => array(
'module' => 'Application',
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Application\Controller\Account',
'action' => 'login',
),
),
'may_terminate' => true,
),
//service
'service' => array(
'type' => 'Segment',
'options' => array(
'route' => '/service[/:action]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'module' => 'Application',
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Application\Controller\Service',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'wildcard' => array(
'type' => 'Wildcard'
)
)
),//service
//search
'search' => array(
'type' => 'Segment',
'options' => array(
'route' => '/search[/page/:page]',
'constraints' => array(
'page' => '[a-zA-Z0-9][a-zA-Z0-9_-]*',
),
'defaults' => array(
'module' => 'Application',
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Application\Controller\Search',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'wildcard' => array(
'type' => 'Wildcard'
)
)
),//search
//about
'about' => array(
'type' => 'Segment',
'options' => array(
'route' => '/about[/:id]',
'constraints' => array(
'id' => '.*',
),
'defaults' => array(
'module' => 'Application',
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Application\Controller\Index',
'action' => 'about',
),
),
'may_terminate' => true,
'child_routes' => array(
'wildcard' => array(
'type' => 'Wildcard'
)
)
),//default
),
),
'service_manager' => array(
'abstract_factories' => array(
'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
'Zend\Log\LoggerAbstractServiceFactory',
),
'aliases' => array(
'translator' => 'MvcTranslator',
),
),
'translator' => array(
'locale' => 'en_US',
'translation_file_patterns' => array(
array(
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
),
),
),
'controllers' => array(
'invokables' => array(
'Application\Controller\Index' => 'Application\Controller\IndexController',
'Application\Controller\Account' => 'Application\Controller\AccountController',
'Application\Controller\Service' => 'Application\Controller\ServiceController',
'Application\Controller\Search' => 'Application\Controller\SearchController',
),
),
'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',
'layout/layout/message' => __DIR__ . '/../view/layout/post-message.phtml',
'layout/layout/header' => __DIR__ . '/../view/layout/header.phtml',
'layout/layout/footer' => __DIR__ . '/../view/layout/footer.phtml',
'pagination/control' => __DIR__ . '/../view/layout/pagination.phtml',
'pagination/search' => __DIR__ . '/../view/layout/pagination-search.phtml',
),
'template_path_stack' => array(
__DIR__ . '/../view',
),
'strategies' => array(
'ViewJsonStrategy',
),
),
// Placeholder for console routes
'console' => array(
'router' => array(
'routes' => array(
),
),
),
);