$value) { $result['participant'][$key] = $value; } } if (!empty($result['participant'])) { foreach ($result['participant'] as $key => $value) { if ($value == 0) { unset($result['participant'][$key]); } else { $participant_number++; $points += $value; } } } $result['participant_number'] = $participant_number; $result['points'] = $points; $result['date_match'] = $match; } if (empty($result['id'])) { if (empty($id)) { $result['id'] = $match[3].$match[2].$match[1]; } else { $result = $id; } } return $result; } function add($id, $field) { $field = $this->handle_field($id, $field); $id = $field['id']; unset($field['date_match']); parent::add($id, $field); } function set($id, $field) { $field = $this->handle_field($id, $field); $id_new = $field['date_match'][3].$field['date_match'][2].$field['date_match'][1]; if ($id != $id_new) { if (!empty($id)) { $this->container[$id_new] = & $this->container[$id]; unset($this->container[$id]); $id = $id_new; } ksort(&$this->container); } unset($field['date_match']); parent::set($id, $field); } } ?>