Exemplo n.º 1
0
 public function parseResultset($data)
 {
     $attributes = $data->attributes();
     $resultSet = new ResultSet((int) $attributes['count'], (int) $attributes['fetch-size']);
     foreach ($data->record as $record) {
         $attributes = $record->attributes();
         $recordObj = new Record((int) $attributes['record-id'], (int) $attributes['mod-id']);
         foreach ($record->field as $field) {
             $attributes = $field->attributes();
             $key = (string) $attributes['name'];
             if (is_array($field->data)) {
                 $values = $field->data;
             } else {
                 $values = (array) $field->data;
             }
             $recordObj->addAttribute($key, $values);
         }
         $resultSet->addRecord($recordObj);
     }
     return $resultSet;
 }
Exemplo n.º 2
0
 /**
  * @return mixed
  */
 public function getIterator()
 {
     return $this->resultSet->getIterator();
 }