Database adapter abstract service factory.

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

package Default

 Methods

Can we create an adapter by the requested name?

canCreateServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $services, string $name, string $requestedName) : boolean
inherited_from \Zend\ServiceManager\AbstractFactoryInterface::canCreateServiceWithName()

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

$requestedName

string

Returns

boolean

Create a DB adapter

createServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $services, string $name, string $requestedName) : \Zend\Db\Adapter\Adapter
inherited_from \Zend\ServiceManager\AbstractFactoryInterface::createServiceWithName()

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

$requestedName

string

Returns

\Zend\Db\Adapter\Adapter

Get db configuration, if any

getConfig(\Zend\ServiceManager\ServiceLocatorInterface $services) : array

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

Returns

array

 Properties

 

$config

$config : array

Default