array( 'services' => array( //'Auth' => new Sookon\Authentication\AuthenticationService(), ), ), 'controllers' => array( 'invokables' => array( 'Metadata\Controller\Index' => 'Metadata\Controller\IndexController', ), ), 'router' => array( 'routes' => array( //数据 'data' => array( 'type' => 'Zend\Mvc\Router\Http\Literal', 'options' => array( 'route' => '/data', 'defaults' => array( 'module' => 'Metadata', '__NAMESPACE__' => 'Metadata\Controller', 'controller' => 'Metadata\Controller\Index', 'action' => 'index', ), ), 'may_terminate' => true, 'child_routes' => array( //view 'view' => array( 'type' => 'Segment', 'options' => array( 'route' => '/[:uuid]', 'constraints' => array( 'uuid' => '[a-zA-Z0-9][a-zA-Z0-9_-]*', ), 'defaults' => array( 'module' => 'Metadata', '__NAMESPACE__' => 'Metadata\Controller', 'controller' => 'Metadata\Controller\Index', 'action' => 'view', ), ), 'may_terminate' => true, 'child_routes' => array( 'wildcard' => array( 'type' => 'Wildcard' ) ) ), // view //tag 'tag' => array( 'type' => 'Segment', 'options' => array( 'route' => '/tag[/keytype/[:keytype]][/:tag]', 'constraints' => array( 'tag' => ".*", 'keytype' => '.*' ), 'defaults' => array( 'module' => 'Metadata', '__NAMESPACE__' => 'Metadata\Controller', 'controller' => 'Metadata\Controller\Index', 'action' => 'tag', ), ), 'may_terminate' => true, 'child_routes' => array( 'wildcard' => array( 'type' => 'Wildcard' ) ) ),//tags 'browse' => array( 'type' => 'Segment', 'options' => array( 'route' => '/browse[/page/:page]', 'constraints' => array( 'page' => "[a-zA-Z0-9][a-zA-Z0-9_-]*", ), 'defaults' => array( 'module' => 'Metadata', '__NAMESPACE__' => 'Metadata\Controller', 'controller' => 'Metadata\Controller\Index', 'action' => 'list', ), ), 'may_terminate' => true, 'child_routes' => array( 'wildcard' => array( 'type' => 'Wildcard' ) ) ),//browse 'onlinelist' => array( 'type' => 'Segment', 'options' => array( 'route' => '/onlinelist[/page/:page]', 'constraints' => array( 'page' => "[a-zA-Z0-9][a-zA-Z0-9_-]*", ), 'defaults' => array( 'module' => 'Metadata', '__NAMESPACE__' => 'Metadata\Controller', 'controller' => 'Metadata\Controller\Index', 'action' => 'onlinelist', ), ), 'may_terminate' => true, 'child_routes' => array( 'wildcard' => array( 'type' => 'Wildcard' ) ) ),//online 'offlinelist' => array( 'type' => 'Segment', 'options' => array( 'route' => '/offlinelist[/page/:page]', 'constraints' => array( 'page' => "[a-zA-Z0-9][a-zA-Z0-9_-]*", ), 'defaults' => array( 'module' => 'Metadata', '__NAMESPACE__' => 'Metadata\Controller', 'controller' => 'Metadata\Controller\Index', 'action' => 'offlinelist', ), ), 'may_terminate' => true, 'child_routes' => array( 'wildcard' => array( 'type' => 'Wildcard' ) ) ),//offlinelist 'unit' => array( 'type' => 'Segment', 'options' => array( 'route' => '/unit[/:name][/page/:page]', 'constraints' => array( 'name' => ".*", 'page' => "[0-9][0-9]*", ), 'defaults' => array( 'module' => 'Metadata', '__NAMESPACE__' => 'Metadata\Controller', 'controller' => 'Metadata\Controller\Index', 'action' => 'unit', ), ), 'may_terminate' => true, 'child_routes' => array( 'wildcard' => array( 'type' => 'Wildcard' ) ) ),//unit ),//data ),//routers ), ),//router 'view_manager' => array( 'template_path_stack' => array( 'metadata' => __DIR__ . '/../view', ), 'template_map' => array( 'layout/metadata/pagination' => __DIR__ . '/../view/layout/pagination-data.phtml', 'layout/metadata/subnav' => __DIR__ . '/../view/metadata/index/pages-navigation.phtml', 'layout/metadata/tag/pagination' => __DIR__ . '/../view/layout/pagination-tag.phtml', 'layout/metadata/tag/list' => __DIR__ . '/../view/metadata/index/tag-list.phtml', 'layout/metadata/datalist' => __DIR__ . '/../view/metadata/index/datalist.phtml', 'layout/metadata/pagination/browse' => __DIR__ . '/../view/layout/pagination-browse.phtml', 'layout/metadata/pagination/onlinelist' => __DIR__ . '/../view/layout/pagination-onlinelist.phtml', 'layout/metadata/pagination/offlinelist' => __DIR__ . '/../view/layout/pagination-offlinelist.phtml', 'layout/metadata/pagination/unit' => __DIR__ . '/../view/layout/pagination-unit.phtml', ), ), );