bulton-fr/bfw-fastroute

BFW 的路由模块

2.0.0-rc.11 2016-10-13 00:00 UTC

README

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version License

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']
        ]
    ]
];