abstract class AbstractManagerRegistry implements ManagerRegistry (View source)

Abstract implementation of the ManagerRegistry contract.

Methods

__construct($name, array $connections, array $managers, $defaultConnection, $defaultManager, $proxyInterfaceName)

No description

object
getService(string $name)

Fetches/creates the given services

void
resetService(string $name)

Resets the given services

string
getName()

Get the name of the registry

Connection
getConnection(string $name = null)

No description

array
getConnectionNames()

No description

array
getConnections()

No description

string
getDefaultConnectionName()

No description

string
getDefaultManagerName()

No description

getManager(string $name = null)

No description

getManagerForClass(string $class)

No description

array
getManagerNames()

No description

array
getManagers()

No description

getRepository($persistentObjectName, string $persistentManagerName = null)

No description

resetManager(string $name = null)

No description

Details

__construct($name, array $connections, array $managers, $defaultConnection, $defaultManager, $proxyInterfaceName)

Parameters

$name
array $connections
array $managers
$defaultConnection
$defaultManager
$proxyInterfaceName

abstract protected object getService(string $name)

Fetches/creates the given services

A service in this context is connection or a manager instance

Parameters

string $name name of the service

Return Value

object instance of the given service

abstract protected void resetService(string $name)

Resets the given services

A service in this context is connection or a manager instance

Parameters

string $name name of the service

Return Value

void

string getName()

Get the name of the registry

Return Value

string

Connection getConnection(string $name = null)

Parameters

string $name The connection name (null for the default one)

Return Value

Connection

array getConnectionNames()

Return Value

array An array of connection names

array getConnections()

Return Value

array An array of Connection instances

string getDefaultConnectionName()

Return Value

string The default connection name

string getDefaultManagerName()

Return Value

string The default object manager name

ObjectManager getManager(string $name = null)

Parameters

string $name The object manager name (null for the default one)

Return Value

ObjectManager

ObjectManager|null getManagerForClass(string $class)

Parameters

string $class A persistent object class name

Return Value

ObjectManager|null

array getManagerNames()

Return Value

array An array of connection names

array getManagers()

Return Value

array An array of ObjectManager instances

ObjectRepository getRepository($persistentObjectName, string $persistentManagerName = null)

Parameters

$persistentObjectName
string $persistentManagerName The object manager name (null for the default one)

Return Value

ObjectRepository

ObjectManager resetManager(string $name = null)

Parameters

string $name The object manager name (null for the default one)

Return Value

ObjectManager