public function run($seq, $tag)
    {
        $this->controller->loadData($tag);

        $timings = $this->panel->calculateTimings();

        if (!isset($timings[$seq])) {
            throw new HttpException(404, 'Log message not found.');
        }

        $query = $timings[$seq]['info'];

        if (strpos($query, 'find({') !== 0) {
            return '';
        }

        $query = substr($query, strlen('find('), -1);
        $result = $this->explainQuery($query);
        if (!$result) {
            return '';
        }

        return Json::encode($result, JSON_PRETTY_PRINT);
    }
public function run($seq, $tag)
    {
        $this->controller->loadData($tag);

        $timings = $this->panel->calculateTimings();

        if (!isset($timings[$seq])) {
            throw new HttpException(404, 'Log message not found.');
        }

        $query = $timings[$seq]['info'];

        if (strpos($query, 'find({') !== 0) {
            return '';
        }

        $query = substr($query, strlen('find('), -1);
        $result = $this->explainQuery($query);
        if (!$result) {
            return '';
        }

        return Json::encode($result, JSON_PRETTY_PRINT);
    }
public function run ( $ seq , $ tag ) { $ this -> controller -> loadData ( $ tag ) ; $ timings = $ this -> panel -> calculateTimings ( ) ; if ( ! isset ( $ timings [ $ seq ] ) ) { throw new HttpException ( 404 , 'Log message not found.' ) ; } $ query = $ timings [ $ seq ] [ 'info' ] ; if ( strpos ( $ query , 'find({' ) !== 0 ) { return '' ; } $ query = substr ( $ query , strlen ( 'find(' ) , - 1 ) ; $ result = $ this -> explainQuery ( $ query ) ; if ( ! $ result ) { return '' ; } return Json :: encode ( $ result , JSON_PRETTY_PRINT ) ; }
Runs the explain action
@param int $seq
@param string $tag
@return string explain result content
@throws HttpException if requested log not found
Runs the explain action