function update_xml_parser::end in Drupal 6
File
- modules/
update/ update.fetch.inc, line 232 - Code required only when fetching information about available updates.
Class
- update_xml_parser
- XML Parser object to read Drupal's release history info files. This uses PHP4's lame XML parsing, but it works.
Code
function end($parser, $name) {
switch ($name) {
case 'PROJECT':
unset($this->current_object);
$this->projects[$this->current_project['short_name']] = $this->current_project;
$this->current_project = array();
break;
case 'RELEASE':
unset($this->current_object);
$this->current_project['releases'][$this->current_release['version']] = $this->current_release;
break;
case 'RELEASES':
$this->current_object =& $this->current_project;
break;
case 'TERM':
unset($this->current_object);
$term_name = $this->current_term['name'];
if (!isset($this->current_release['terms'])) {
$this->current_release['terms'] = array();
}
if (!isset($this->current_release['terms'][$term_name])) {
$this->current_release['terms'][$term_name] = array();
}
$this->current_release['terms'][$term_name][] = $this->current_term['value'];
break;
case 'TERMS':
$this->current_object =& $this->current_release;
break;
case 'FILE':
unset($this->current_object);
$this->current_release['files'][] = $this->current_file;
break;
case 'FILES':
$this->current_object =& $this->current_release;
break;
default:
$this->current_object[strtolower($this->current_tag)] = trim($this->current_object[strtolower($this->current_tag)]);
$this->current_tag = '';
}
}