public function onLogQuery(callable $callback = null)
    {
        if ($callback === null || is_callable($callback)) {
            $this->on_log_query = $callback;
        } else {
            throw new InvalidArgumentException('Callback needs to be NULL or callable');
        }
    }
public function onLogQuery(callable $callback = null)
    {
        if ($callback === null || is_callable($callback)) {
            $this->on_log_query = $callback;
        } else {
            throw new InvalidArgumentException('Callback needs to be NULL or callable');
        }
    }
public function onLogQuery ( callable $ callback = null ) { if ( $ callback === null || is_callable ( $ callback ) ) { $ this -> on_log_query = $ callback ; } else { throw new InvalidArgumentException ( 'Callback needs to be NULL or callable' ) ; } }
Set a callback that will receive every query after we run it.

Callback should accept two parameters: first for SQL that was ran, and second for time that it took to run

@param callable|null $callback
Set a callback that will receive every query after we run it .