zendframework/zf2 — pull request #2903 by ClemensSahs (2012-11-06 12:31:49+00:00)
Title: add AdapterManager in to Zend\Db\Adapter namespace

this AdapterManger allows handle multible database connections and aliase

unit tests will follow

```php
#autoload/global.php
return array(
'db'=>array(
'user'=>'global',

'global'=>array(
'driver'=>array(
'driver'=>'Pdo_Mysql',
'database'=>'my_database_name',
'username'=>'root',
'password'=>null,
'characterset'=>'utf8'
)
),
),
);
```

```php
# module.php
public function getServiceConfig()
{
return array(
'factories' => array(
'db_adapter_service' => 'Zend\Db\Adapter\AdapterServiceFactory',
'my_user_db_adapter' => function ($sm) {
$dbAdapterContainer = $sm->get('db_adapter_service');
return $dbAdapterContainer->getAdapter('user');
},
)
);
}
```