1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/manual/codes/Basic Components - Record - Getting record state.php

32 lines
963 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
$state = $record->getState();
switch($state):
case Doctrine_Record::STATE_PROXY:
// record is in proxy state,
2006-07-24 01:08:06 +04:00
// meaning its persistent but not all of its properties are
// loaded from the database
break;
case Doctrine_Record::STATE_TCLEAN:
// record is transient clean,
2006-07-24 01:08:06 +04:00
// meaning its transient and
// none of its properties are changed
break;
case Doctrine_Record::STATE_TDIRTY:
// record is transient dirty,
2006-07-24 01:08:06 +04:00
// meaning its transient and
// some of its properties are changed
break;
case Doctrine_Record::STATE_DIRTY:
// record is dirty,
2006-07-24 01:08:06 +04:00
// meaning its persistent and
// some of its properties are changed
break;
case Doctrine_Record::STATE_CLEAN:
// record is clean,
2006-07-24 01:08:06 +04:00
// meaning its persistent and
// none of its properties are changed
break;
endswitch;
?>