Model/Datasource/ArraySource.php
public function getLog($sorted = false, $clear = true) {
		if ($sorted) {
			$log = sortByKey($this->_requestsLog, 'took', 'desc', SORT_NUMERIC);
		} else {
			$log = $this->_requestsLog;
		}
		if ($clear) {
			$this->_requestsLog = array();
		}
		return array('log' => $log, 'count' => count($log), 'time' => array_sum(Hash::extract($log, '{n}.took')));
	}
public function getLog($sorted = false, $clear = true) {
		if ($sorted) {
			$log = sortByKey($this->_requestsLog, 'took', 'desc', SORT_NUMERIC);
		} else {
			$log = $this->_requestsLog;
		}
		if ($clear) {
			$this->_requestsLog = array();
		}
		return array('log' => $log, 'count' => count($log), 'time' => array_sum(Hash::extract($log, '{n}.took')));
	}
public function getLog ( $ sorted = false , $ clear = true ) { if ( $ sorted ) { $ log = sortByKey ( $ this -> _requestsLog , 'took' , 'desc' , SORT_NUMERIC ) ; } else { $ log = $ this -> _requestsLog ; } if ( $ clear ) { $ this -> _requestsLog = array ( ) ; } return array ( 'log' => $ log , 'count' => count ( $ log ) , 'time' => array_sum ( Hash :: extract ( $ log , '{n}.took' ) ) ) ; }
Get the query log as an array.

@param boolean $sorted Get the queries sorted by time taken, defaults to false.
@param boolean $clear Clear after return logs
@return array Array of queries run as an array
Get the query log as an array .