php DB adapter, with magic

I would like to encapsulate the handling of database connections, and maintain a loose coupling between database connections and application and data-access code. I'll not focus on connection pooling since that can be handled at the driver level independent of the application and adapter code.

I would like to leverage the PDO interface as well as magic handling of the connections to allow for complete encapsulation of read-slaves and write-masters.