protected function Dbug::xmlDefaultHandler in dBug for Drupal 8
Same name and namespace in other branches
- 2.0.x src/Dbug.php \Drupal\dbug\Dbug::xmlDefaultHandler()
- 1.0.x src/Dbug.php \Drupal\dbug\Dbug::xmlDefaultHandler()
Xml: initiated when a comment or other miscellaneous texts is encountered.
Parameters
string $parser: The parser.
string $data: The data.
File
- src/
Dbug.php, line 694
Class
- Dbug
- Implementation of dBug for Drupal.
Namespace
Drupal\dbugCode
protected function xmlDefaultHandler($parser, $data) {
// Strip '<!--' and '-->' off comments.
$data = str_replace([
"<!--",
"-->",
], "", htmlspecialchars($data));
$count = $this->xmlCount - 1;
if (!empty($this->xmlDData[$count])) {
$this->xmlDData[$count] .= $data;
}
else {
$this->xmlDData[$count] = $data;
}
}