bulton-fr / bfw-fastroute
BFW 的路由模块
2.0.0-rc.11
2016-10-13 00:00 UTC
Requires
- bulton-fr/bfw: ~3.0.0-RC11@RC
- nikic/fast-route: ~v1.3
Requires (Dev)
- atoum/atoum: ~3.1
- atoum/visibility-extension: ~1.3
This package is auto-updated.
Last update: 2024-09-26 02:00:51 UTC
README
BFW 框架的路由模块。使用 lib fastRoute
安装
您可以使用 composer 来获取模块: composer require bulton-fr/bfw-fastroute @stable
并且安装模块: ./vendor/bin/bfwInstallModules
配置
此模块的所有配置文件都将位于 app/config/bfw-fastroute/
。有一个文件用于配置(manifest.json 是用于模块更新系统的)。
文件 routes.php
routes
:所有定义的路由。您有一个示例用于使用的格式。对于“target”键,请参考使用的控制器模块。
示例
从 BFW 维基 中提取,一个使用模块 bfw-controller 的配置文件示例。
<?php return [ 'routes' => [ '/test' => [ 'target' => ['\Controller\Test', 'index'] ] ] ];