pmc / gigafactory
A factory of factories which assists in making modular applications
Installs: 1 583
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.1
- pmc/objectlib: >=0.8.1 <2.0
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is auto-updated.
Last update: 2022-11-29 01:56:23 UTC
README
GigaFactory is a simple container which allows you to register multiple factory classes and provides a single place you can call for creating your objects.
The GigaFactory will scan all the registered factories to for one that can create the required object and invoke a method on that factory determined by a given name resolver.
Use Case
While working on a framework for a Command Query Responsibility Separation (CQRS) and
Event Source (ES) based system, I wanted a single entry point where I could create
the required Command or Query object from only a class name and a $data
array of
parameters.
Example
TBC