/** * Overrides Doctrine_Record::fromArray() so that extension objects can be hydrated too * * @param array $ary Associative array of field and values to use for hydration * @param boolean $deep Whether Doctrine relations should be hydrated too; false by default * @return Entity The hydrated Entity */ public function fromArray(array $ary, $deep = true, $hydrateExtensions = false) { $ret = parent::fromArray($ary, $deep); if ($hydrateExtensions) { $objects = $this->getExtensionObjects(); foreach ($objects as $object) { $object->fromArray($ary, $deep); } } return $ret; }