Back to Update class

Method _characterData

public void
_characterData
(mixed $parser, mixed $data)
Character Parser Function
Parameters
  • object $parser Parser object.
  • object $data The data.
Returns
  • void
Since
  • 1.7.0
-
  • This is public because its called externally.
Class: Update
Project: Joomla

Method _characterData - Source code

/**
 * Character Parser Function
 *
 * @param   object  $parser  Parser object.
 * @param   object  $data    The data.
 *
 * @return  void
 *
 * @note    This is public because its called externally.
 * @since   1.7.0
 */
public function _characterData($parser, $data)
{
    $tag = $this->_getLastTag();
    // Throw the data for this item together
    $tag = strtolower($tag);
    if ($tag === 'tag') {
        $this->currentUpdate->stability = $this->stabilityTagToInteger((string) $data);
        return;
    }
    if ($tag === 'downloadsource') {
        // Grab the last source so we can append the URL
        $source = end($this->downloadSources);
        $source->url = $data;
        return;
    }
    if (isset($this->currentUpdate->{$tag})) {
        $this->currentUpdate->{$tag}->_data .= $data;
    }
}