Example #1
0
 /**
  * Overrides Doctrine_Record::fromArray() so that the category object 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, $hydrateCategory = false)
 {
     $ret = parent::fromArray($ary, $deep);
     if ($hydrateCategory) {
         if ($object = $this->getCategoryObject()) {
             $object->fromArray($ary, $deep);
         }
     }
     return $ret;
 }