Oihana PHP

Oihana PHP Traits

Reusable, composable object traits for PHP 8.4+.

πŸ“š Documentation

Narrative user guides (FR + EN), with examples:

You are currently browsing the auto-generated API reference (phpDocumentor).

πŸš€ Features

  • 🧩 DI-container awareness β€” ContainerTrait.
  • πŸ’€ Lazy & πŸ”’ lockable state β€” LazyTrait, LockableTrait.
  • πŸ†” Identifiers β€” IDTrait, QueryIDTrait.
  • πŸ—‚οΈ Config & key-value access β€” ConfigTrait, KeyValueTrait, JsonOptionsTrait.
  • πŸ”— URI building, stringable & expression helpers β€” UriTrait, ToStringTrait, strings\ExpressionTrait.
  • πŸ§ͺ 100% unit-test line coverage.

πŸ“¦ Installation

This library requires PHP 8.4+ and is installed via Composer:

composer require oihana/php-traits

🧾 License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).

πŸ‘€ About the Author

πŸ”— Related packages

πŸ”— Project on GitHub

View the full source code and contribute on GitHub: github.com/BcommeBois/oihana-php-traits.

Search results