PHPackages                             val/doctrine-table-prefix-service-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. val/doctrine-table-prefix-service-provider

ActiveLibrary[Database &amp; ORM](/categories/database)

val/doctrine-table-prefix-service-provider
==========================================

Doctrine event listener to dynamically add a table prefix.

v1.0.0(12y ago)051MITPHP

Since Mar 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/valeriangalliat/doctrine-table-prefix-service-provider)[ Packagist](https://packagist.org/packages/val/doctrine-table-prefix-service-provider)[ RSS](/packages/val-doctrine-table-prefix-service-provider/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Doctrine table prefix service provider
======================================

[](#doctrine-table-prefix-service-provider)

> Doctrine event listener to dynamically add a table prefix.

Features
--------

[](#features)

- Add a table prefix for any configured database directly in the configuration array.
- Framework agnostic (since it extends [Pimple](http://pimple.sensiolabs.org/)).

The `TablePrefix` code is totally taken from the [documentation](https://github.com/doctrine/orm-documentation/blob/master/en/cookbook/sql-table-prefixes.rst).

Installation
------------

[](#installation)

```
composer require val/doctrine-table-prefix-service-provider
```

Usage
-----

[](#usage)

Assuming `$app` is an instance of `Pimple`, `Silex\Application` or `Cilex\Application`.

### Configuration

[](#configuration)

#### Single DB

[](#single-db)

```
