1
0
mirror of synced 2025-02-20 22:23:14 +03:00
This commit is contained in:
zYne 2007-09-20 20:15:34 +00:00
parent df0081f13b
commit 2f70b203e6
2 changed files with 6 additions and 16 deletions

View File

@ -102,10 +102,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
* @var Doctrine_Validator_ErrorStack error stack object
*/
protected $_errorStack;
/**
* @var Doctrine_Record_Filter the filter object
*/
protected $_filter;
/**
* @var array $_references an array containing all the references
*/
@ -143,9 +139,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
$exists = false;
}
// initialize the filter object
$this->_filter = new Doctrine_Record_Filter($this);
// Check if the current connection has the records table in its registry
// If not this record is only used for creating table definition and setting up
// relations.
@ -571,7 +564,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
}
$this->_table->getRepository()->add($this);
$this->_filter = new Doctrine_Record_Filter($this);
$this->cleanData($this->_data);
@ -798,12 +790,12 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
$this->_references[$name] = $rel->fetchRelatedFor($this);
}
return $this->_references[$name];
} catch(Doctrine_Table_Exception $e) {
throw new Doctrine_Record_Exception("Unknown property / related component '$name'.");
}
return $this->_references[$name];
}
/**
* mapValue
@ -1262,7 +1254,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
{
if ($id === false) {
$this->_id = array();
$this->_data = $this->_filter->cleanData($this->_data);
$this->_data = $this->cleanData($this->_data);
$this->_state = Doctrine_Record::STATE_TCLEAN;
$this->_modified = array();
} elseif ($id === true) {

View File

@ -31,7 +31,7 @@
* @since 1.0
* @version $Revision: 1298 $
*/
class Doctrine_Record_Filter
abstract class Doctrine_Record_Filter
{
/**
* @var Doctrine_Record $_record the record object this filter belongs to
@ -61,14 +61,12 @@ class Doctrine_Record_Filter
*
* @param mixed $name name of the property or related component
*/
abstract public function filterSet($key, $value)
{ }
abstract public function filterSet($key, $value);
/**
* filterGet
* defines an implementation for filtering the get() method of Doctrine_Record
*
* @param mixed $name name of the property or related component
*/
abstract public function filterGet($key)
{ }
abstract public function filterGet($key);
}