zfegg/global-router

此包已被废弃,不再维护。未建议替代包。

Zend Framework V2 或 V3 全局路由配置 '/[:module[:/controller[:/action]]]'

1.0.1 2016-07-11 06:48 UTC

This package is not auto-updated.

Last update: 2021-04-03 00:43:06 UTC


README

ZendMvc 内置的 Zend\Mvc\ModuleRouteListener 不太方便,每个新的 Controller 都需要在 ControllerManager 中进行配置。使用 Zfegg\GlobalRouter\GlobalModuleRouteListener

安装

composer require zfegg/global-router

使用举例

首先,在 config/modules.config.php 中添加模块加载。

return [
    //... Your modules
    'Zfegg\\GlobalRouter'
];

默认路由方式: /module/controller/action/param1/value1/param2/value2/... ,类似于ZF1默认路由。