Commit 1b8e9ea0 authored by Jonathan.Wage's avatar Jonathan.Wage

Removed getState() method and changed all references to getState() to state()

parent 5a976de3
......@@ -578,17 +578,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
$this->postUnserialize($event);
}
/**
* getState
* returns the current state of the object
*
* @see Doctrine_Record::STATE_* constants
* @return integer
*/
public function getState()
{
return $this->_state;
}
/**
* state
* returns / assigns the state of this record
......
......@@ -55,7 +55,7 @@ class Doctrine_Validator_Unique
// If the record is not new we need to add primary key checks because its ok if the
// unique value already exists in the database IF the record in the database is the same
// as the one that is validated here.
$state = $record->getState();
$state = $record->state();
if (! ($state == Doctrine_Record::STATE_TDIRTY || $state == Doctrine_Record::STATE_TCLEAN)) {
foreach ($table->getPrimaryKeys() as $pk) {
$sql .= " AND {$pk} != ?";
......
......@@ -90,11 +90,11 @@ class Doctrine_Record_Hook_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($r->something, 'something');
$this->assertEqual($r->deleted, null);
$this->assertEqual($r->getState(), Doctrine_Record::STATE_CLEAN);
$this->assertEqual($r->state(), Doctrine_Record::STATE_CLEAN);
try{
$r->delete();
$this->assertEqual($r->getState(), Doctrine_Record::STATE_CLEAN);
$this->assertEqual($r->state(), Doctrine_Record::STATE_CLEAN);
$this->assertEqual($r->deleted, true);
}catch(Doctrine_Exception $e){
$this->fail();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment