(Adding to zitan's note)
It seems easy enough to provide output functions for callback handler classes too.
Example:
<?php
class CallBack {
var $name = 'Callback';
var $info = 'Information!';
function toString() {
return $this->name.': '.$this->info;
}
}
class Main {
var $name = 'Main';
var $callBackObject;
function setCallBack(&$cBIn) { $this->callBackObject = $cBIn; }
function toString() {
return $this->name.': '.$this->callBackObject->toString();
}
}
$cb = & new CallBack;
$m = & new Main;
$m->setCallBack(&$cb);
echo $cb->toString();
echo $m->toString();
?>
So, after collecting information during the parse operation within the callback handler class, e.g. in tag_close(), retrieving them is possible.