Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[DoctrineBundle] added Registry::getConnections()
  • Loading branch information
fabpot committed Jun 7, 2011
1 parent 2a5d768 commit 85a381d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Symfony/Bundle/DoctrineBundle/Registry.php
Expand Up @@ -68,6 +68,21 @@ public function getConnection($name = null)
return $this->container->get($this->connections[$name]);
}

/**
* Gets an array of all registered connections
*
* @return array An array of Connection instances
*/
public function getConnections()
{
$connections = array();
foreach ($this->connections as $name => $id) {
$connections[$name] = $this->container->get($id);
}

return $connections;
}

/**
* Gets all connection names.
*
Expand Down

0 comments on commit 85a381d

Please sign in to comment.