PHP Класс Bisna\Doctrine\Container

Автор: Guilherme Blanco ([email protected])
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$defaultCacheInstance Default Cache Instance name.
$defaultConnection Default DBAL Connection name.
$defaultDocumentManager Default ODM DocumentManager name.
$defaultEntityManager Default ORM EntityManager name.

Открытые методы

Метод Описание
__construct ( array $config = [] ) Constructor.
getCacheInstance ( string $cacheName = null ) : Doctrine\Common\Cache\Cache Retrieve Cache Instance based on its name. If no argument is provided, it will attempt to get the default Instance.
getCacheInstanceNames ( ) : array Retrieves a list of names for all cache instances configured
getConnection ( string $connName = null ) : Doctrine\DBAL\Connection Retrieve DBAL Connection based on its name. If no argument is provided, it will attempt to get the default Connection.
getConnectionNames ( ) : array Retrieves a list of names for all Connections configured and/or loaded
getDocumentManager ( string $dmName = null ) : DocumentManager Retrieve ODM DocumentManager based on its name. If no argument provided, it will attempt to get the default DocumentManager.
getEntityManager ( string $emName = null ) : EntityManager Retrieve ORM EntityManager based on its name. If no argument provided, it will attempt to get the default EntityManager.
getEntityManagerNames ( ) : array Retrieves a list of names for all Entity Managers configured and/or loaded

Приватные методы

Метод Описание
prepareCacheInstanceConfiguration ( array $config = [] ) : array Prepare Cache Instances configurations.
prepareDBALConfiguration ( array $config = [] ) : array Prepare DBAL Connections configurations.
prepareODMConfiguration ( array $config = [] ) : array Prepare ODM EntityManagers configurations.
prepareORMConfiguration ( array $config = [] ) : array Prepare ORM EntityManagers configurations.
registerClassLoaders ( array $config = [] ) Register Doctrine Class Loaders
startAnnotationRegistry ( array $config ) Initialize ORM Metadata Annotation Registry driver
startCacheInstance ( array $config = [] ) : Doctrine\Common\Cache\Cache Initialize Cache Instance.
startDBALConfiguration ( array $config = [] ) : Doctrine\DBAL\Configuration Initialize the DBAL Configuration.
startDBALConnection ( array $config = [] ) : Doctrine\DBAL\Connection Initialize the DBAL Connection.
startDBALEventManager ( array $config = [] ) : Doctrine\Common\EventManager Initialize the EventManager.
startODMConfiguration ( array $config = [] ) : Configuration Initialize ODM Configuration.
startODMDocumentManager ( array $config = [] ) : DocumentManager Initialize the ODM Document Manager
startODMMetadata ( array $config = [] ) : Doctrine\ODM\MongoDB\Mapping\Driver\DriverChain Initialize ODM Metadata drivers.
startORMConfiguration ( array $config = [] ) : Doctrine\ORM\Configuration Initialize ORM Configuration.
startORMEntityManager ( array $config = [] ) : EntityManager Initialize ORM EntityManager.
startORMMetadata ( array $config = [] ) : Doctrine\ORM\Mapping\Driver\DriverChain Initialize ORM Metadata drivers.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( array $config = [] )
$config array Doctrine Container configuration

getCacheInstance() публичный Метод

If Cache Instance name could not be found, NameNotFoundException is thrown.
public getCacheInstance ( string $cacheName = null ) : Doctrine\Common\Cache\Cache
$cacheName string Optional Cache Instance name
Результат Doctrine\Common\Cache\Cache Cache Instance

getCacheInstanceNames() публичный Метод

Retrieves a list of names for all cache instances configured
public getCacheInstanceNames ( ) : array
Результат array

getConnection() публичный Метод

If DBAL Connection name could not be found, NameNotFoundException is thrown.
public getConnection ( string $connName = null ) : Doctrine\DBAL\Connection
$connName string Optional DBAL Connection name
Результат Doctrine\DBAL\Connection DBAL Connection

getConnectionNames() публичный Метод

Retrieves a list of names for all Connections configured and/or loaded
public getConnectionNames ( ) : array
Результат array

getDocumentManager() публичный Метод

If ODM DocumentManager name could not be found, NameNotFoundException is thrown.
public getDocumentManager ( string $dmName = null ) : DocumentManager
$dmName string Optional ODM DocumentManager name
Результат Doctrine\ODM\MongoDB\DocumentManager

getEntityManager() публичный Метод

If ORM EntityManager name could not be found, NameNotFoundException is thrown.
public getEntityManager ( string $emName = null ) : EntityManager
$emName string Optional ORM EntityManager name
Результат Doctrine\ORM\EntityManager ORM EntityManager

getEntityManagerNames() публичный Метод

Retrieves a list of names for all Entity Managers configured and/or loaded
public getEntityManagerNames ( ) : array
Результат array

Описание свойств

$defaultCacheInstance публичное свойство

Default Cache Instance name.
public $defaultCacheInstance

$defaultConnection публичное свойство

Default DBAL Connection name.
public $defaultConnection

$defaultDocumentManager публичное свойство

Default ODM DocumentManager name.
public $defaultDocumentManager

$defaultEntityManager публичное свойство

Default ORM EntityManager name.
public $defaultEntityManager