├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── src ├── Attribute │ ├── AttributeRouteCollector.php │ ├── ControllerRoute.php │ └── Route.php ├── Exception │ ├── MethodNotAllowed.php │ └── RouteNotFound.php ├── Helper.php ├── Route.php ├── Router.php ├── RouterInterface.php ├── RouterMiddleware.php ├── Traits │ └── RouteTrait.php └── UrlGenerator.php └── tests ├── AttributeRouteCollectorTest.php ├── Controller ├── ApiController.php ├── PingController.php ├── ProductController.php └── UserController.php ├── RouteTest.php └── RouterTest.php /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /.idea/ 3 | composer.lock 4 | /tests/cache -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/README.md -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/composer.json -------------------------------------------------------------------------------- /src/Attribute/AttributeRouteCollector.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Attribute/AttributeRouteCollector.php -------------------------------------------------------------------------------- /src/Attribute/ControllerRoute.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Attribute/ControllerRoute.php -------------------------------------------------------------------------------- /src/Attribute/Route.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Attribute/Route.php -------------------------------------------------------------------------------- /src/Exception/MethodNotAllowed.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Exception/MethodNotAllowed.php -------------------------------------------------------------------------------- /src/Exception/RouteNotFound.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Exception/RouteNotFound.php -------------------------------------------------------------------------------- /src/Helper.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Helper.php -------------------------------------------------------------------------------- /src/Route.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Route.php -------------------------------------------------------------------------------- /src/Router.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Router.php -------------------------------------------------------------------------------- /src/RouterInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/RouterInterface.php -------------------------------------------------------------------------------- /src/RouterMiddleware.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/RouterMiddleware.php -------------------------------------------------------------------------------- /src/Traits/RouteTrait.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/Traits/RouteTrait.php -------------------------------------------------------------------------------- /src/UrlGenerator.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/src/UrlGenerator.php -------------------------------------------------------------------------------- /tests/AttributeRouteCollectorTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/tests/AttributeRouteCollectorTest.php -------------------------------------------------------------------------------- /tests/Controller/ApiController.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/tests/Controller/ApiController.php -------------------------------------------------------------------------------- /tests/Controller/PingController.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/tests/Controller/PingController.php -------------------------------------------------------------------------------- /tests/Controller/ProductController.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/tests/Controller/ProductController.php -------------------------------------------------------------------------------- /tests/Controller/UserController.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/tests/Controller/UserController.php -------------------------------------------------------------------------------- /tests/RouteTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/tests/RouteTest.php -------------------------------------------------------------------------------- /tests/RouterTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpdevcommunity/php-router/HEAD/tests/RouterTest.php --------------------------------------------------------------------------------