thenlabs / components
A custom implementation of the Composite pattern in PHP for create component types with useful functionalities.
Installs: 349
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 2
Open Issues: 0
pkg:composer/thenlabs/components
Requires
- php: >=7.2
- composer/semver: >=1.5
- doctrine/annotations: ^1.6
- symfony/event-dispatcher: >=4.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.2
- thenlabs/pyramidal-tests: 2.0.x-dev
README
A custom implementation of the Composite pattern in PHP for create component types with useful functionalities.
If you like this project gift us a ⭐.
Features.
- 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.
Installation.
$ composer require thenlabs/components
Documentation.
- English (Pending)
- Español
Development.
Clone this repository and install the Composer dependencies.
$ composer install
Running the tests.
All the tests of this project was written with our testing framework PyramidalTests wich is based on PHPUnit.
Run tests:
$ composer test