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.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

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

static configure ( Factory  $factory)
static

Configure the factory.

Parameters
$factoryFactory instance that actually does the instantiation.

Definition at line 32 of file ObjectFactory.php.

static isConfigured ( )
static

Check if the factory is configured.

Returns
Boolean

Definition at line 40 of file ObjectFactory.php.

static getInstance (   $name,
  $dynamicConfiguration = [] 
)
static
See also
Factory::getInstance()

Definition at line 47 of file ObjectFactory.php.

static getNewInstance (   $name,
  $dynamicConfiguration = [] 
)
static
See also
Factory::getNewInstance()

Definition at line 55 of file ObjectFactory.php.

static getInstanceOf (   $class,
  $dynamicConfiguration = [] 
)
static
See also
Factory::getInstanceOf()

Definition at line 63 of file ObjectFactory.php.

static registerInstance (   $name,
  $instance 
)
static
See also
Factory::registerInstance()

Definition at line 71 of file ObjectFactory.php.

addInterfaces (   $interfaces)
See also
Factory::addInterfaces()

Definition at line 79 of file ObjectFactory.php.

static clear ( )
static
See also
Factory::clear()

Definition at line 87 of file ObjectFactory.php.