naoki-tsuchiya / yii-route-list
0.1.2
2022-10-15 09:12 UTC
Requires
- php: ^7.4 || ^8.0
- yiisoft/yii: ^1.1.22
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-17 09:09:58 UTC
README
naoki-tsuchiya/yii-route-list
It gets a list of route from each of rules of UrlManager in Yii Framework 1.1.
Installation
composer require --dev naoki-tsuchiya/yii-route-list
Usage
<?php use NaokiTsuchiya\YiiRouteList\YiiRouteList; define('YII_ENABLE_EXCEPTION_HANDLER', false); define('YII_ENABLE_ERROR_HANDLER', false); require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/yiisoft/yii/framework/yii.php'; // Your Yii application config $config = dirname(__FILE__).'/protected/config/main.php'; $app = Yii::createWebApplication($config) $routeList = (new YiiRouteList())($app); foreach ($routeList as $route) { var_dump($route->rule); var_dump($route->controller); var_dump($route->action); }