public function __call($method, $args)
{
if (!$this->isOn()) {
return;
}
// if the called is a MessageCollector method, redirect to MessageCollector->add
if (in_array($method, ['table', 'info', 'warning', 'error', 'log', 'success'])) {
$collector = $this->collectorMan->get('MessageCollector');
array_unshift($args, $method);
$method = 'add';
} elseif ($collector = $this->collectorMan->getMethod($method)) {
$method = 'b_' . $method;
} else {
die("Method {$method} not found in collector classes");
}
return call_user_func_array(array(&$collector, $method), $args);
}