DboSource::getLog PHP Method

getLog() public method

Get the query log as an array.
public getLog ( boolean $sorted = false, boolean $clear = true ) : array
$sorted boolean Get the queries sorted by time taken, defaults to false.
$clear boolean If True the existing log will cleared.
return array Array of queries run as an array
    public function getLog($sorted = false, $clear = true)
    {
        if ($sorted) {
            $log = sortByKey($this->_queriesLog, 'took', 'desc', SORT_NUMERIC);
        } else {
            $log = $this->_queriesLog;
        }
        if ($clear) {
            $this->_queriesLog = array();
        }
        return array('log' => $log, 'count' => $this->_queriesCnt, 'time' => $this->_queriesTime);
    }
DboSource