dev-master
9999999-devDoctrine event listener to dynamically add a table prefix.
Unlicense
The Development Requires
by Valérian Galliat
silex doctrine table pimple prefix cilex
Doctrine event listener to dynamically add a table prefix.
Doctrine event listener to dynamically add a table prefix., (*1)
The TablePrefix
code is totally taken from the [documentation][2]., (*2)
composer require val/doctrine-table-prefix-service-provider
Assuming $app
is an instance of Pimple
, Silex\Application
or Cilex\Application
., (*3)
<?php $app['db.options']['prefix'] = 'prefix_';
<?php $app['dbs.options']['first']['prefix'] = 'first_'; $app['dbs.options']['second']['prefix'] = 'second_';
<?php use Val\Pimple\Provider\DoctrineTablePrefixServiceProvider; new DoctrineTablePrefixServiceProvider()->register($app);
<?php use Val\Silex\Provider\DoctrineTablePrefixServiceProvider; $app->register(new DoctrineTablePrefixServiceProvider());
<?php use Val\Cilex\Provider\DoctrineTablePrefixServiceProvider; $app->register(new DoctrineTablePrefixServiceProvider());
Doctrine event listener to dynamically add a table prefix.
Unlicense
silex doctrine table pimple prefix cilex