private function MongoDbProfilerStorage::buildQuery

Parameters

string $ip:

string $url:

string $method:

int $start:

int $end:

Return value

array

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php, line 171

Class

MongoDbProfilerStorage

Namespace

Symfony\Component\HttpKernel\Profiler

Code

private function buildQuery($ip, $url, $method, $start, $end) {
  $query = array();
  if (!empty($ip)) {
    $query['ip'] = $ip;
  }
  if (!empty($url)) {
    $query['url'] = $url;
  }
  if (!empty($method)) {
    $query['method'] = $method;
  }
  if (!empty($start) || !empty($end)) {
    $query['time'] = array();
  }
  if (!empty($start)) {
    $query['time']['$gte'] = $start;
  }
  if (!empty($end)) {
    $query['time']['$lte'] = $end;
  }
  return $query;
}