Ejemplo n.º 1
0
 public function toArray()
 {
     $data = $this->data()->getAll();
     $arr = parent::toArray();
     return array_merge($data, $arr);
 }
Ejemplo n.º 2
0
 protected function recordToArray(Am_Record $rec)
 {
     $ret = $rec->toArray();
     if (!empty($rec->_nested_)) {
         foreach ($rec->_nested_ as $table => $slaveRecords) {
             foreach ($slaveRecords as $slaveRecord) {
                 $ret['nested'][$table][] = $slaveRecord->toArray();
             }
         }
     }
     return $ret;
 }