1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/manual/codes/Basic Components - Connection - Getting connection state.php

17 lines
434 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
2007-02-06 17:41:00 +03:00
switch($conn->getState()):
case Doctrine_Connection::STATE_ACTIVE:
// connection open and zero open transactions
2006-07-24 01:08:06 +04:00
break;
case Doctrine_Connection::STATE_ACTIVE:
2006-07-24 01:08:06 +04:00
// one open transaction
break;
case Doctrine_Connection::STATE_BUSY:
2006-07-24 01:08:06 +04:00
// multiple open transactions
break;
case Doctrine_Connection::STATE_CLOSED:
// connection closed
2006-07-24 01:08:06 +04:00
break;
endswitch;
?>