Commit 2f70b203 authored by zYne's avatar zYne

--no commit message

--no commit message
parent df0081f1
...@@ -102,10 +102,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count ...@@ -102,10 +102,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
* @var Doctrine_Validator_ErrorStack error stack object * @var Doctrine_Validator_ErrorStack error stack object
*/ */
protected $_errorStack; protected $_errorStack;
/**
* @var Doctrine_Record_Filter the filter object
*/
protected $_filter;
/** /**
* @var array $_references an array containing all the references * @var array $_references an array containing all the references
*/ */
...@@ -143,9 +139,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count ...@@ -143,9 +139,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
$exists = false; $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 // 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 // If not this record is only used for creating table definition and setting up
// relations. // relations.
...@@ -571,7 +564,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count ...@@ -571,7 +564,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
} }
$this->_table->getRepository()->add($this); $this->_table->getRepository()->add($this);
$this->_filter = new Doctrine_Record_Filter($this);
$this->cleanData($this->_data); $this->cleanData($this->_data);
...@@ -798,12 +790,12 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count ...@@ -798,12 +790,12 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
$this->_references[$name] = $rel->fetchRelatedFor($this); $this->_references[$name] = $rel->fetchRelatedFor($this);
} }
return $this->_references[$name];
} catch(Doctrine_Table_Exception $e) { } catch(Doctrine_Table_Exception $e) {
throw new Doctrine_Record_Exception("Unknown property / related component '$name'."); throw new Doctrine_Record_Exception("Unknown property / related component '$name'.");
} }
return $this->_references[$name];
} }
/** /**
* mapValue * mapValue
...@@ -1262,7 +1254,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count ...@@ -1262,7 +1254,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
{ {
if ($id === false) { if ($id === false) {
$this->_id = array(); $this->_id = array();
$this->_data = $this->_filter->cleanData($this->_data); $this->_data = $this->cleanData($this->_data);
$this->_state = Doctrine_Record::STATE_TCLEAN; $this->_state = Doctrine_Record::STATE_TCLEAN;
$this->_modified = array(); $this->_modified = array();
} elseif ($id === true) { } elseif ($id === true) {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* @since 1.0 * @since 1.0
* @version $Revision: 1298 $ * @version $Revision: 1298 $
*/ */
class Doctrine_Record_Filter abstract class Doctrine_Record_Filter
{ {
/** /**
* @var Doctrine_Record $_record the record object this filter belongs to * @var Doctrine_Record $_record the record object this filter belongs to
...@@ -61,14 +61,12 @@ class Doctrine_Record_Filter ...@@ -61,14 +61,12 @@ class Doctrine_Record_Filter
* *
* @param mixed $name name of the property or related component * @param mixed $name name of the property or related component
*/ */
abstract public function filterSet($key, $value) abstract public function filterSet($key, $value);
{ }
/** /**
* filterGet * filterGet
* defines an implementation for filtering the get() method of Doctrine_Record * defines an implementation for filtering the get() method of Doctrine_Record
* *
* @param mixed $name name of the property or related component * @param mixed $name name of the property or related component
*/ */
abstract public function filterGet($key) abstract public function filterGet($key);
{ }
} }
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