bulton-fr/bfw-fastroute

Router module for BFW

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

README

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version License

Router module for the framework BFW. Use the lib fastRoute

Install :

You can use composer to get the module : composer require bulton-fr/bfw-fastroute @stable

And to install the module : ./vendor/bin/bfwInstallModules

Config :

All config file for this module will be into app/config/bfw-fastroute/. There is one file to configure (manifest.json is for the module update system).

The file routes.php

  • routes : All routes defined. You have an exemple for the format to use. For the key "target", referer you to the controller module used.

Example :

Extract from the BFW wiki, an exemple of the config file to use with the module bfw-controller.

<?php
return [
    'routes' => [
        '/test' => [
            'target' => ['\Controller\Test', 'index']
        ]
    ]
];