Beispiel #1
0
 function compose($o)
 {
     if ($this->data) {
         foreach ($this->data as $k => $v) {
             is_scalar($v) && ($o->{$k} = $v);
         }
         if ($this instanceof agent_pForm_record_indexable) {
             $o = $this->composeRecord($o);
         }
         return parent::compose($o);
     } else {
         return $this instanceof agent_pForm_record_indexable ? $this->composeIndex($o) : parent::compose($o);
     }
 }
 function compose($o)
 {
     if (empty($this->entity)) {
         return $this->composeIndex($o);
     } else {
         if (!$this->entityIsNew) {
             $this->data += $this->getEntityData();
             foreach ($this->data as $k => $v) {
                 $o->{$k} = $v;
             }
         }
         if ($this instanceof agent_pForm_entity_indexable) {
             $o = $this->composeEntity($o);
         }
         return parent::compose($o);
     }
 }