Suggestion - Failover connections like CodeIgniter

I was reading CodeIgniter documentation and in its database section it has “failover” configuration. Framework will connect to database in “Failover” configuration if it fails to connect to default database. If CakePHP can introduce something like that it will be a very helpful feature and developers will not have to switch connection in the code if there is a database connectivity failure.

Just a suggestion

I think this failover can be implemented as a middleware, where db-connection can be checked and (if db is down) updated on the spot using connection manager. Just my thoughts if I were to implement a failover in cakephp.