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

17 lines
433 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
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;
?>