Doctrine 1.2.4
Doctrine_Record_Filter_Compound Class Reference

Inherits Doctrine_Record_Filter.

Public Member Functions

 filterGet (Doctrine_Record $record, $name)
 
 filterSet (Doctrine_Record $record, $name, $value)
 

Detailed Description

Definition at line 33 of file Compound.php.

Member Function Documentation

Doctrine_Record_Filter_Compound::filterGet ( Doctrine_Record  $record,
  $name 
)

filterGet defines an implementation for filtering the get() method of Doctrine_Record

Parameters
mixed$namename of the property or related component

Definition at line 82 of file Compound.php.

{
foreach ($this->_aliases as $alias) {
if ( ! $record->exists()) {
if (isset($record[$alias][$name])) {
return $record[$alias][$name];
}
} else {
if (isset($record[$alias][$name])) {
return $record[$alias][$name];
}
}
}
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $name, get_class($record)));
}
Doctrine_Record_Filter_Compound::filterSet ( Doctrine_Record  $record,
  $name,
  $value 
)

filterSet defines an implementation for filtering the set() method of Doctrine_Record

Parameters
mixed$namename of the property or related component

Definition at line 56 of file Compound.php.

{
foreach ($this->_aliases as $alias) {
if ( ! $record->exists()) {
if (isset($record[$alias][$name])) {
$record[$alias][$name] = $value;
return $record;
}
} else {
if (isset($record[$alias][$name])) {
$record[$alias][$name] = $value;
}
return $record;
}
}
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $name, get_class($record)));
}

The documentation for this class was generated from the following file: