pmc/gigafactory

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v0.8) of this package.

A factory of factories which assists in making modular applications

v0.8 2017-07-06 07:21 UTC

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