Removed getState() method and changed all references to getState() to state()
This commit is contained in:
parent
5a976de3f4
commit
1b8e9ea091
@ -578,17 +578,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
|
|||||||
|
|
||||||
$this->postUnserialize($event);
|
$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
|
* state
|
||||||
* returns / assigns the state of this record
|
* 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
|
// 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
|
// unique value already exists in the database IF the record in the database is the same
|
||||||
// as the one that is validated here.
|
// as the one that is validated here.
|
||||||
$state = $record->getState();
|
$state = $record->state();
|
||||||
if (! ($state == Doctrine_Record::STATE_TDIRTY || $state == Doctrine_Record::STATE_TCLEAN)) {
|
if (! ($state == Doctrine_Record::STATE_TDIRTY || $state == Doctrine_Record::STATE_TCLEAN)) {
|
||||||
foreach ($table->getPrimaryKeys() as $pk) {
|
foreach ($table->getPrimaryKeys() as $pk) {
|
||||||
$sql .= " AND {$pk} != ?";
|
$sql .= " AND {$pk} != ?";
|
||||||
|
@ -90,11 +90,11 @@ class Doctrine_Record_Hook_TestCase extends Doctrine_UnitTestCase
|
|||||||
$this->assertEqual($r->something, 'something');
|
$this->assertEqual($r->something, 'something');
|
||||||
|
|
||||||
$this->assertEqual($r->deleted, null);
|
$this->assertEqual($r->deleted, null);
|
||||||
$this->assertEqual($r->getState(), Doctrine_Record::STATE_CLEAN);
|
$this->assertEqual($r->state(), Doctrine_Record::STATE_CLEAN);
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$r->delete();
|
$r->delete();
|
||||||
$this->assertEqual($r->getState(), Doctrine_Record::STATE_CLEAN);
|
$this->assertEqual($r->state(), Doctrine_Record::STATE_CLEAN);
|
||||||
$this->assertEqual($r->deleted, true);
|
$this->assertEqual($r->deleted, true);
|
||||||
}catch(Doctrine_Exception $e){
|
}catch(Doctrine_Exception $e){
|
||||||
$this->fail();
|
$this->fail();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user