val/doctrine-table-prefix-service-provider
Composer 安装命令:
composer require val/doctrine-table-prefix-service-provider
包简介
Doctrine event listener to dynamically add a table prefix.
README 文档
README
Doctrine event listener to dynamically add a table prefix.
Features
- Add a table prefix for any configured database directly in the configuration array.
- Framework agnostic (since it extends Pimple).
The TablePrefix code is totally taken from the documentation.
Installation
composer require val/doctrine-table-prefix-service-provider
Usage
Assuming $app is an instance of Pimple, Silex\Application or Cilex\Application.
Configuration
Single DB
<?php $app['db.options']['prefix'] = 'prefix_';
Multiple DBs
<?php $app['dbs.options']['first']['prefix'] = 'first_'; $app['dbs.options']['second']['prefix'] = 'second_';
Registration
Pimple
<?php use Val\Pimple\Provider\DoctrineTablePrefixServiceProvider; new DoctrineTablePrefixServiceProvider()->register($app);
Silex
<?php use Val\Silex\Provider\DoctrineTablePrefixServiceProvider; $app->register(new DoctrineTablePrefixServiceProvider());
Cilex
<?php use Val\Cilex\Provider\DoctrineTablePrefixServiceProvider; $app->register(new DoctrineTablePrefixServiceProvider());
统计信息
- 总下载量: 51
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-03-31