public function execute($sql, $executor)
    {
        foreach($this->_onquery as $callback)
            $sql = call_user_func($callback, $sql);

        try {
            $ts = count($this->_onresult) ? microtime(true) : NULL;
            $result = call_user_func($executor, $sql);

            foreach($this->_onresult as $callback)
                $result = call_user_func($callback, $sql, $result, $ts);

            return $result;
        } catch (\Exception $e) {
            foreach($this->_onerror as $callback)
                call_user_func($callback, $e);

            throw $e;
        }
    }
public function execute($sql, $executor)
    {
        foreach($this->_onquery as $callback)
            $sql = call_user_func($callback, $sql);

        try {
            $ts = count($this->_onresult) ? microtime(true) : NULL;
            $result = call_user_func($executor, $sql);

            foreach($this->_onresult as $callback)
                $result = call_user_func($callback, $sql, $result, $ts);

            return $result;
        } catch (\Exception $e) {
            foreach($this->_onerror as $callback)
                call_user_func($callback, $e);

            throw $e;
        }
    }
public function execute ( $ sql , $ executor ) { foreach ( $ this -> _onquery as $ callback ) $ sql = call_user_func ( $ callback , $ sql ) ; try { $ ts = count ( $ this -> _onresult ) ? microtime ( true ) : NULL ; $ result = call_user_func ( $ executor , $ sql ) ; foreach ( $ this -> _onresult as $ callback ) $ result = call_user_func ( $ callback , $ sql , $ result , $ ts ) ; return $ result ; } catch ( \ Exception $ e ) { foreach ( $ this -> _onerror as $ callback ) call_user_func ( $ callback , $ e ) ; throw $ e ; } }
Executes the query through the internal filters and executor
@return result set of some sort
Executes the query through the internal filters and executor