Download the PHP package rradutzu/zend2-doctrine-dynamic-db without Composer
On this page you can find all versions of the php package rradutzu/zend2-doctrine-dynamic-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download rradutzu/zend2-doctrine-dynamic-db
More information about rradutzu/zend2-doctrine-dynamic-db
Files in rradutzu/zend2-doctrine-dynamic-db
Download rradutzu/zend2-doctrine-dynamic-db
More information about rradutzu/zend2-doctrine-dynamic-db
Files in rradutzu/zend2-doctrine-dynamic-db
Vendor rradutzu
Package zend2-doctrine-dynamic-db
Short Description Zend2/3 Doctrine Module that allows defining connections using dynamic database names
License GPL-2.0
Package zend2-doctrine-dynamic-db
Short Description Zend2/3 Doctrine Module that allows defining connections using dynamic database names
License GPL-2.0
Please rate this library. Is it a good library?
Informations about the package zend2-doctrine-dynamic-db
Doctrine Dynamic Db Adapter
Zend2 Doctrine Module that allows defining connections using dynamic database names
Usage
-
Include 'DoctrineDynamicDb' in your modules.config.php file
-
Add to the used connection the 'dbNameFactory' param.:
return array( //... 'doctrine' => array( 'connection' => array( //... 'orm_dynamic' => array( 'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver', 'params' => array( 'host' => 'localhost', 'port' => '3306', 'user' => 'root', 'password' => 'kotor3', 'dbname' => '%',
// this needs to return instance of DoctrineMultiDbAdapter\Client\ClientInterface, // a custom object or a string which represents the db name 'dbNameFactory' => 'ClientFactory', // optional | name of the method used to retrieve the db name if dbNameFactory // returns a custom object 'dbNameFactoryMethod' => 'getClientDb' ) ) ), 'dynamic_entitymanager' => array( // need to add the connection to the new entity manager 'orm_dynamic' => array() ) ), //...
);
3.Get the entity manager for the dynamic connection using:
$em = $serviceLocator->get('doctrine.dynamic_entitymanager.##connection_name##');
All versions of zend2-doctrine-dynamic-db with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
composer/installers Version ~1.0
doctrine/doctrine-orm-module Version ^6.0
composer/installers Version ~1.0
doctrine/doctrine-orm-module Version ^6.0
The package rradutzu/zend2-doctrine-dynamic-db contains the following files
Loading the files please wait ....