. */ /** * Doctrine_Db_LazyConnector * * @author Konsta Vesterinen * @license LGPL * @package Doctrine */ class Doctrine_Db_LazyConnector extends Doctrine_Db_EventListener { public function onPreQuery(Doctrine_Db $dbh, array $args) { $dbh->connect(); } public function onPrePrepare(Doctrine_Db $dbh, array $args) { $dbh->connect(); } public function onPreCommit(Doctrine_Db $dbh) { $dbh->connect(); } public function onPreRollBack(Doctrine_Db $dbh) { $dbh->connect(); } public function onPreBeginTransaction(Doctrine_Db $dbh) { $dbh->connect(); } }