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;
    }
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;
    }
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 ; }
Adds a callback that gets passed any extra varargs as a arguments
@chainable
Adds a callback that gets passed any extra varargs as a arguments