Fully Qualified Name: | Zend\ServiceManager\DelegatorFactoryInterface |
Extends: | DelegatorFactoryInterface |
Backwards-compatibility shim for DelegatorFactoryInterface.
Implementations should update to implement only Zend\ServiceManager\Factory\DelegatorFactoryInterface.
If upgrading from v2, take the following steps:
createDelegatorWithName()
to __invoke()
, and:$serviceLocator
argument to $container
, and change the
typehint to Interop\Container\ContainerInterface
$name
and $requestedName
argumentscallable
typehint to the $callback
argumentarray $options = null
argument as a final argumentcreateDelegatorWithName()
method as defined in this interface, and have it
proxy to __invoke()
, passing $requestedName
as the second argument.Once you have tested your code, you can then update your class to only implement
Zend\ServiceManager\Factory\DelegatorFactoryInterface, and remove the createDelegatorWithName()
method.
Name | Description | Defined By |
---|---|---|
__invoke() | A factory that creates delegates of a given service | DelegatorFactoryInterface |
createDelegatorWithName() | A factory that creates delegates of a given service | DelegatorFactoryInterface |
A factory that creates delegates of a given service
Parameter Name | Type | Description |
---|---|---|
$container | \ContainerInterface | |
$name | string | |
$callback | callable | |
$options | null|array |
Returns: object
A factory that creates delegates of a given service
Parameter Name | Type | Description |
---|---|---|
$serviceLocator | \ServiceLocatorInterface | the |
$name | string | the |
$requestedName | string | the |
$callback | callable | the |
Returns: mixed