public function callback($callback)
{
$t = $this;
$args = array_slice(func_get_args(), 1);
// use an event handler to dispatch to the callback
$this->_events->register('startTransaction', function ($event, $connection) use($t, $callback, $args) {
$t->results[] = call_user_func_array($callback, $args);
});
return $this;
}