Fully Qualified Name: | Laminas\ServiceManager\InitializerInterface |
Extends: | InitializerInterface |
Backwards-compatibility shim for InitializerInterface.
Implementations should update to implement only Laminas\ServiceManager\Initializer\InitializerInterface.
If upgrading from v2, take the following steps:
initialize()
to __invoke()
, and:$serviceLocator
argument to $container
, and change the
typehint to Interop\Container\ContainerInterface
$instance
comes second)initialize()
method as defined in this interface, and have it
proxy to __invoke()
, passing the arguments in the new order.Once you have tested your code, you can then update your class to only implement
Laminas\ServiceManager\Initializer\InitializerInterface, and remove the initialize()
method.
Name | Description | Defined By |
---|---|---|
__invoke() | Initialize the given instance | InitializerInterface |
initialize() | Initialize | InitializerInterface |
Initialize the given instance
Parameter Name | Type | Description |
---|---|---|
$container | \ContainerInterface | |
$instance | object |
Returns: void
Initialize
Parameter Name | Type | Description |
---|---|---|
$instance | ||
$serviceLocator | \ServiceLocatorInterface | |
$instance |
Returns: mixed