You are here

function update_status_xml_parser::end in Update Status 5.2

File

./update_status.module, line 1720

Class

update_status_xml_parser
XML Parser object to read Drupal's project info files This uses PHP4's lame XML parsing, but it works. Mostly.

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;
    default:
      $this->current_object[strtolower($this->current_tag)] = trim($this->current_object[strtolower($this->current_tag)]);
      $this->current_tag = '';
  }
}