Declarative, composable HTTP route definitions for PHP 8.4+, built on Slim.
π Documentation
Narrative user guides (FR + EN), with examples:
- π¬π§ English documentation
- π«π· Documentation franΓ§aise
You are currently browsing the auto-generated API reference (phpDocumentor).
π Features
- π§ A composable
Routebase and per-verb route classes βGetRoute,PostRoute,PutRoute,PatchRoute,DeleteRoute,OptionsRoute,ListRoute. - π Higher-level routes β
DocumentRouteandI18nRoutefor documents and localized paths. - π© Declarative route options via the
RouteFlagbit flags. - π§© Route registration helpers β
HttpMethodRoutesTrait,HasRouteTrait, pluswithPlaceholder()andresponsePassthrough(). - π Built on Slim and wired through a PSR-11 container.
- π§ͺ 100% unit-test line coverage.
π¦ Installation
This library requires PHP 8.4+ and is installed via Composer:
composer require oihana/php-routes
π§Ύ License
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).
π€ About the Author
- Name: Marc ALCARAZ (aka eKameleon)
- Website: www.ooop.fr
- Email: marc@ooop.fr
π Related packages
- oihana/php-controllers β the HTTP controllers the routes dispatch to (provides
AppTrait). - oihana/php-core β core helpers and utilities used by this library.
- oihana/php-enums β strongly-typed constant enumerations (HTTP methods, etc.).
π Project on GitHub
View the full source code and contribute on GitHub: github.com/BcommeBois/oihana-php-routes.