ObjectFactory Class Reference
Detailed Description
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing static access to it.
It delegates the work of actually instantiating services to the configured Factory instance.
Definition at line 24 of file ObjectFactory.php.
Public Member Functions | |
addInterfaces ($interfaces) | |
Static Public Member Functions | |
static | configure (Factory $factory) |
static | isConfigured () |
static | getInstance ($name, $dynamicConfiguration=[]) |
static | getNewInstance ($name, $dynamicConfiguration=[]) |
static | getInstanceOf ($class, $dynamicConfiguration=[]) |
static | registerInstance ($name, $instance) |
static | clear () |
Member Function Documentation
◆ configure()
|
static |
Configure the factory.
- Parameters
-
$factory Factory instance that actually does the instantiation.
Definition at line 32 of file ObjectFactory.php.
◆ isConfigured()
|
static |
◆ getInstance()
|
static |
- See also
- Factory::getInstance()
Definition at line 47 of file ObjectFactory.php.
◆ getNewInstance()
|
static |
- See also
- Factory::getNewInstance()
Definition at line 55 of file ObjectFactory.php.
◆ getInstanceOf()
|
static |
- See also
- Factory::getInstanceOf()
Definition at line 63 of file ObjectFactory.php.
◆ registerInstance()
|
static |
- See also
- Factory::registerInstance()
Definition at line 71 of file ObjectFactory.php.
◆ addInterfaces()
addInterfaces | ( | $interfaces | ) |
- See also
- Factory::addInterfaces()
Definition at line 79 of file ObjectFactory.php.
◆ clear()
|
static |
- See also
- Factory::clear()
Definition at line 87 of file ObjectFactory.php.