Fully Qualified Name: | Laminas\ServiceManager\FactoryInterface |
Extends: | FactoryInterface |
Backwards-compatibility shim for FactoryInterface.
Implementations should update to implement only Laminas\ServiceManager\Factory\FactoryInterface.
If upgrading from v2, take the following steps:
createService()
to __invoke()
, and:$serviceLocator
argument to $container
, and change the
typehint to Interop\Container\ContainerInterface
$requestedName
as a second argumentarray $options = null
argument as a final argumentcreateService()
method as defined in this interface, and have it
proxy to __invoke()
.Once you have tested your code, you can then update your class to only implement
Laminas\ServiceManager\Factory\FactoryInterface, and remove the createService()
method.
Name | Description | Defined By |
---|---|---|
__invoke() | Create an object | FactoryInterface |
createService() | Create service | FactoryInterface |
Create an object
Parameter Name | Type | Description |
---|---|---|
$container | \ContainerInterface | |
$requestedName | string | |
$options | null|array |
Returns: object
Create service
Parameter Name | Type | Description |
---|---|---|
$serviceLocator | \ServiceLocatorInterface |
Returns: mixed