2017 © Pedro PelĂĄez
 

library doctrine-table-prefix-service-provider

Doctrine event listener to dynamically add a table prefix.

image

val/doctrine-table-prefix-service-provider

Doctrine event listener to dynamically add a table prefix.

  • Tuesday, June 13, 2017
  • by val
  • Repository
  • 1 Watchers
  • 0 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Doctrine table prefix service provider

Doctrine event listener to dynamically add a table prefix., (*1)

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][2]., (*2)

Installation

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

Usage

Assuming $app is an instance of Pimple, Silex\Application or Cilex\Application., (*3)

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());

The Versions

13/06 2017

dev-master

9999999-dev

Doctrine event listener to dynamically add a table prefix.

  Sources   Download

Unlicense

The Development Requires

by Valérian Galliat

silex doctrine table pimple prefix cilex

31/03 2014

v1.0.0

1.0.0.0

Doctrine event listener to dynamically add a table prefix.

  Sources   Download

MIT

by Valérian Galliat

silex doctrine table pimple prefix cilex