Zend Framework  3.0
Public Member Functions | List of all members
DiFactory Class Reference

Public Member Functions

 __invoke (ContainerInterface $container, $name, array $options=null)
 Create and return abstract factory seeded by dependency injector.
 
 createService (ServiceLocatorInterface $container)
 Create and return Di instance.
 

Member Function Documentation

__invoke ( ContainerInterface  $container,
  $name,
array  $options = null 
)

Create and return abstract factory seeded by dependency injector.

Creates and returns an abstract factory seeded by the dependency injector. If the "di" key of the configuration service is set, that sub-array is passed to a DiConfig object and used to configure the DI instance. The DI instance is then used to seed the DiAbstractServiceFactory, which is then registered with the service manager.

Parameters
ContainerInterface$container
string$name
null | array$options
Returns
Di

Implements FactoryInterface.

createService ( ServiceLocatorInterface  $container)

Create and return Di instance.

For use with zend-servicemanager v2; proxies to __invoke().

Parameters
ServiceLocatorInterface$container
Returns
Di

Implements FactoryInterface.