atrauzzi/laravel-doctrine — pull request #43 by arraintxo (2014-11-26 08:49:22+00:00)
Title: Chain Driver Support

Added ChainDriver support.

This allows anyone to add subsequent drivers to the chain in another place (i.e. app/start/global.php).
It also allows Doctrine Extensions integration.

As a namespace is required for the ChainDriver, I added a driverChain array to the configuration, so the driver can be enabled an a defaultNamespace specified.

If the chainDriver is disabled (default configuration), or not configured, it will work with the default annotation driver, so nothing should be broken with the merge.

Sluggable Doctrine Extension use example:
```
//// app/start/global.php ////

[....]

$driverChain = Doctrine::getConfiguration()->getMetadataDriverImpl();
$annotationDriver = $driverChain->getDrivers()['Entity'];

\Gedmo\DoctrineExtensions::registerAbstractMappingIntoDriverChainORM(
$driverChain,
$annotationDriver->getReader()
);

$sluggableListener = new \Gedmo\Sluggable\SluggableListener;
$sluggableListener->setAnnotationReader($annotationDriver->getReader());
Doctrine::getEventManager()->addEventSubscriber($sluggableListener);

```