You are here

class ReportEngine in XHProf 8

Provides report generator.

Hierarchy

Expanded class hierarchy of ReportEngine

1 string reference to 'ReportEngine'
xhprof.services.yml in ./xhprof.services.yml
xhprof.services.yml
1 service uses ReportEngine
xhprof.report_engine in ./xhprof.services.yml
Drupal\xhprof\XHProfLib\Report\ReportEngine

File

src/XHProfLib/Report/ReportEngine.php, line 12

Namespace

Drupal\xhprof\XHProfLib\Report
View source
class ReportEngine {

  /**
   * @param $url_params
   * @param $source
   * @param Run $run
   * @param $wts
   * @param $symbol
   * @param $sort
   * @param Run $run1
   * @param Run $run2
   *
   * @return ReportInterface
   */
  public function getReport($url_params, $source, Run $run, $wts, $symbol, $sort = 'wt', Run $run1 = NULL, Run $run2 = NULL) {
    $report = NULL;

    // specific run to display
    if ($run) {
      $parser = new Parser($run, $sort, $symbol);
      $report = new Report($parser);
    }
    else {
      if ($run1 && $run2) {
        $report = new DiffParser($url_params, $run1
          ->getSymbols(), '', $run2
          ->getSymbols(), '', $symbol, $sort, $run1, $run2);
        $report = new DiffReport($report);
      }
    }
    return $report;
  }

}

Members