Class AdapterAbstractServiceFactory

Summary

Fully Qualified Name: Zend\Db\Adapter\AdapterAbstractServiceFactory
Implements: AbstractFactoryInterface

Description

Database adapter abstract service factory.

Allows configuring several database instances (such as writer and reader).

Methods

Name Description Defined By
__invoke() Create a DB adapter AdapterAbstractServiceFactory
canCreate() Can we create an adapter by the requested name? AdapterAbstractServiceFactory
canCreateServiceWithName() Determine if we can create a service with name (SM v2 compatibility) AdapterAbstractServiceFactory
createServiceWithName() Create service with name AdapterAbstractServiceFactory

Method Details

__invoke()

Create a DB adapter

Parameter Name Type Description
$container \ContainerInterface
$requestedName string
$options array

Returns: \Adapter

canCreate()

Can we create an adapter by the requested name?

Parameter Name Type Description
$container \ContainerInterface
$requestedName string

Returns: bool

canCreateServiceWithName()

Determine if we can create a service with name (SM v2 compatibility)

Parameter Name Type Description
$serviceLocator \ServiceLocatorInterface
$name string
$requestedName string

Returns: bool

createServiceWithName()

Create service with name

Parameter Name Type Description
$serviceLocator \ServiceLocatorInterface
$name string
$requestedName string

Returns: \Adapter

Top