wikimedia/object-factory
Wikimedia ObjectFactory builds PHP objects from declarative specifications, mapping class names, constructor arguments, and factory callables to instances. Lightweight, dependency-free, and used by Wikibase and other Wikimedia projects.
wikimedia/object-factory is a small PHP library for instantiating objects from declarative specifications. Give it an array describing a class name, a factory callable, or an already-constructed object, and it returns the object—handling constructor arguments, post-construction method calls, and validation along the way. It is particularly useful for dependency injection and service wiring in large applications.
class, factory, or object specificationsargs and post-construction callsgetObjectFromSpec() APIHow can I help you explore Laravel packages today?