Multiple Databases with the same Model

For a new application we are looking for a php web framework that supports multiple databases with the same schema/model. Every customer of us will become his own webserver with his own database. On top of this we want to develop a central administration app that works on all customer databases, which are all have the same schema/model. Does Yii support such a thing? If not, would it be easy to add this to the current Database/Active Record functionality?

you can add function in your model like:


public function getDbConnection()

{

    return Yii::app()->user->getState('myDbConnectionId');

}

But how can i set myDbConnectionId dynamically so that every time i can specify the db to be used?