From d1085b0056789be9acb4cdfd50c6f07f745482cc Mon Sep 17 00:00:00 2001 From: mahono Date: Wed, 13 Jun 2007 12:31:03 +0000 Subject: [PATCH] added Doctrine_Record->isModified() --- lib/Doctrine/Record.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index c09d1e107..e33beb39a 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -1068,6 +1068,17 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite return ($this->_state !== Doctrine_Record::STATE_TCLEAN && $this->_state !== Doctrine_Record::STATE_TDIRTY); } + /** + * isModified + * returns true if this record was modified, otherwise false + * + * @return boolean + */ + public function isModified() + { + return ($this->_state === Doctrine_Record::STATE_DIRTY || + $this->_state === Doctrine_Record::STATE_TDIRTY); + } /** * method for checking existence of properties and Doctrine_Record references * @param mixed $name name of the property or reference