/** * filterGet * defines an implementation for filtering the get() method of Doctrine_Record * * @param mixed $name name of the property or related component */ public function filterGet(Doctrine_Record $record, $name) { foreach ($this->_aliases as $alias) { if (!$record->exists()) { if (isset($record[$alias][$name])) { return $record[$alias][$name]; } } else { // we do not want to execute N + 1 queries here, hence we cannot use get() if (($ref = $record->reference($alias)) !== null) { if (isset($ref[$name])) { return $ref[$name]; } } } } }