How can i get the Doctrine_Record's unchanged version of field data. For example;
echo $user->username; // Prints 'David'
$user->username = 'John';
echo $user->username; // Prints 'John'
How to get the pre-changed value (David)?
How can i get the Doctrine_Record's unchanged version of field data. For example;
echo $user->username; // Prints 'David'
$user->username = 'John';
echo $user->username; // Prints 'John'
How to get the pre-changed value (David)?
$modified = $user->getModified(true);
or if you have access to protected fields:
if (in_array('username', $this->_modified)) {
// username changed
}