This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/DoctrineBundle/DataCollector
Fabien Potencier 6b5438aa38 [DoctrineBundle] introduced a Registry class
The Registry knows all connections and entity managers declared into a service
container. The Registry is available via the 'doctrine' service.

If can be used to get connections and entity managers by name:

Before:

$em = $this->get('doctrine.orm.entity_manager');
$em = $this->get('doctrine.orm.foobar_entity_manager');

After:

$em = $this->get('doctrine')->getEntityManager();
$em = $this->get('doctrine')->getEntityManager('foobar');

It is better for several reasons:

 * we rely less on naming conventions
 * IDEs will be able to auto-complete methods
2011-05-02 22:28:48 +02:00
..
DoctrineDataCollector.php [DoctrineBundle] introduced a Registry class 2011-05-02 22:28:48 +02:00