Composable HTTP controller building blocks for PHP 8.4+, built on Slim and Twig.
π 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
Controllerbase and focused traits β params, pagination, languages, routing, status, Twig, JSON/CBOR. - π§© Typed request-parameter extraction & strategies β
ParamsTrait,ParamsStrategyTrait, thegetParam*()helpers. - π₯ File responses β download, streaming, HTTP range, ETag & 304 Not Modified, content headers.
- ποΈ Archives, uploads & encryption β zip/tar, file upload and OpenSSL file encryption.
- π‘οΈ CSRF, HTTP cache and language negotiation on top of Slim & Twig.
- π§ͺ 100% unit-test line coverage.
π¦ Installation
This library requires PHP 8.4+ and is installed via Composer:
composer require oihana/php-controllers
π§Ύ 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-models β document/PDO models used by the data controllers.
- oihana/php-files β file, archive and encryption helpers behind the file responses.
- oihana/php-core β core helpers and utilities used by this library.
π Project on GitHub
View the full source code and contribute on GitHub: github.com/BcommeBois/oihana-php-controllers.