ekino/EkinoWordpressBundle — pull request #9 by GromNaN (2014-04-15 22:16:54+00:00)
Title: Make the entity manager configurable

In my application, I need to separate the "wordpress" entities from other entities. To do that, I use many entity managers like documented here : http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html

With this PR, I can configure the entity manager that is injected into the managers and avoid this kind of error:
> MappingException: The class 'Ekino\WordpressBundle\Entity\User' was not found in the chain configured namespaces App\AppBundle\Entity

I'm not sure if this is the best way to handle this problem, but it is clean and works fine.

Exemple of configuration:

```yaml
# app/config/config.yml

doctrine:
dbal:
default_connection: default
connections:
default:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
user: %database_user%
password: %database_password%
charset: UTF8
wordpress:
driver: %database_wp_driver%
host: %database_wp_host%
port: %database_wp_port%
dbname: %database_wp_name%
user: %database_wp_user%
password: %database_wp_password%
charset: UTF8
orm:
default_entity_manager: default
entity_managers:
default:
connection: default
mappings:
AppBundle: ~
wordpress:
connection: wordpress
mappings:
EkinoWordpressBundle: ~

ekino_wordpress:
table_prefix: wp_
entity_manager: wordpress
```