84 lines
2.3 KiB
PHP
84 lines
2.3 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(
|
||
|
'service_manager' => array(
|
||
|
'services' => array(
|
||
|
//'Auth' => new Sookon\Authentication\AuthenticationService(),
|
||
|
),
|
||
|
),
|
||
|
|
||
|
'controllers' => array(
|
||
|
'invokables' => array(
|
||
|
'Metadata\Controller\Index' => 'Metadata\Controller\IndexController',
|
||
|
),
|
||
|
),
|
||
|
|
||
|
'router' => array(
|
||
|
'routes' => array(
|
||
|
|
||
|
//通配路由
|
||
|
'metadata' => array(
|
||
|
'type' => 'Segment',
|
||
|
'options' => array(
|
||
|
'route' => '/metadata[/:controller[/:action[/page/:page][/id/:id]]]',
|
||
|
'constraints' => array(
|
||
|
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
||
|
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
||
|
'page' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
||
|
'id' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
||
|
),
|
||
|
'defaults' => array(
|
||
|
'module' => 'Article',
|
||
|
'__NAMESPACE__' => 'Article\Controller',
|
||
|
'controller' => 'Article\Controller\Index',
|
||
|
'action' => 'index',
|
||
|
),
|
||
|
),
|
||
|
'may_terminate' => true,
|
||
|
'child_routes' => array(
|
||
|
'wildcard' => array(
|
||
|
'type' => 'Wildcard'
|
||
|
)
|
||
|
)
|
||
|
),
|
||
|
|
||
|
//数据
|
||
|
'data' => array(
|
||
|
'type' => 'Segment',
|
||
|
'options' => array(
|
||
|
'route' => '/data[/:uuid]',
|
||
|
'constraints' => array(
|
||
|
'uuid' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
||
|
),
|
||
|
'defaults' => array(
|
||
|
'module' => 'Metadata',
|
||
|
'__NAMESPACE__' => 'Metadata\Controller',
|
||
|
'controller' => 'Metadata\Controller\Index',
|
||
|
'action' => 'index',
|
||
|
),
|
||
|
),
|
||
|
'may_terminate' => true
|
||
|
),
|
||
|
|
||
|
),//routers
|
||
|
),
|
||
|
|
||
|
|
||
|
'view_manager' => array(
|
||
|
'template_path_stack' => array(
|
||
|
'metadata' => __DIR__ . '/../view',
|
||
|
),
|
||
|
'template_map' => array(
|
||
|
'layout/metadata/pagination' => __DIR__ . '/../view/layout/pagination-news.phtml',
|
||
|
|
||
|
),
|
||
|
),
|
||
|
);
|