sergiors/routing-service-provider
Composer 安装命令:
composer require sergiors/routing-service-provider
包简介
Import your routes from YAML, PHP files or Directory.
README 文档
README
Import your routes from yaml, php files or directory.
Install
composer require sergiors/routing-service-provider "dev-master"
How to user
Your yaml file
index_controller: prefix: / defaults: {_controller: 'Acme\Acme\Controller\IndexController::indexAction'}
In your php file
use Sergiors\Silex\RoutingServiceProvider; $app->register(new RoutingServiceProvider(), [ 'routing.resource' => __DIR__.'/routing.yml' ]);
Remeber, you need install symfony/yaml to use YAML.
To use %root_dir% in your yaml files, you need to install symfony/dependency-injection and set $app['routing.replacements'] = ['root_dir' => '']
License
MIT
统计信息
- 总下载量: 42.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-01