src/PhpQuickProfiler.php
public function gatherQueryData($dbConnection = null)
    {
        if (is_null($dbConnection)) {
            return array();
        }

        if (empty($this->profiledQueries) && property_exists($dbConnection, 'queries')) {
            $this->setProfiledQueries($dbConnection->queries);
        }

        $data = array();
        foreach ($this->profiledQueries as $query) {
            array_push($data, array(
                'sql'     => $query['sql'],
                'explain' => $this->explainQuery($dbConnection, $query['sql'], $query['parameters']),
                'time'    => $query['time']
            ));
        }
        return $data;
    }
public function gatherQueryData($dbConnection = null)
    {
        if (is_null($dbConnection)) {
            return array();
        }

        if (empty($this->profiledQueries) && property_exists($dbConnection, 'queries')) {
            $this->setProfiledQueries($dbConnection->queries);
        }

        $data = array();
        foreach ($this->profiledQueries as $query) {
            array_push($data, array(
                'sql'     => $query['sql'],
                'explain' => $this->explainQuery($dbConnection, $query['sql'], $query['parameters']),
                'time'    => $query['time']
            ));
        }
        return $data;
    }
public function gatherQueryData ( $ dbConnection = null ) { if ( is_null ( $ dbConnection ) ) { return array ( ) ; } if ( empty ( $ this -> profiledQueries ) && property_exists ( $ dbConnection , 'queries' ) ) { $ this -> setProfiledQueries ( $ dbConnection -> queries ) ; } $ data = array ( ) ; foreach ( $ this -> profiledQueries as $ query ) { array_push ( $ data , array ( 'sql' => $ query [ 'sql' ] , 'explain' => $ this -> explainQuery ( $ dbConnection , $ query [ 'sql' ] , $ query [ 'parameters' ] ) , 'time' => $ query [ 'time' ] ) ) ; } return $ data ; }
Get data about sql usage of the application

@param object $dbConnection
@returns array
Get data about sql usage of the application