A custom implementation of the Composite pattern in PHP for create component types with useful functionalities.
If you like this project gift us a ⭐.
- PHP >= 7.2
- Two component types(simple and composite).
- Tree structure.
- Dependency management.
- Useful methods for filter and iterate over the tree.
- Events dispatching.
- Event propagation(capture and bubbling) across the tree.
- Support of custom data.
$ composer require thenlabs/components
- English (Pending)
- Español
Clone this repository and install the Composer dependencies.
$ composer install
All the tests of this project was written with our testing framework PyramidalTests wich is based on PHPUnit.
Run tests:
$ composer test