public function MongoDbProfilerStorage::find

Finds profiler tokens for the given criteria.

Parameters

string $ip The IP:

string $url The URL:

string $limit The maximum number of tokens to return:

string $method The request method:

int|null $start The start date to search from:

int|null $end The end date to search to:

Return value

array An array of tokens

Overrides ProfilerStorageInterface::find

File

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

Class

MongoDbProfilerStorage

Namespace

Symfony\Component\HttpKernel\Profiler

Code

public function find($ip, $url, $limit, $method, $start = null, $end = null) {
  $cursor = $this
    ->getMongo()
    ->find($this
    ->buildQuery($ip, $url, $method, $start, $end), array(
    '_id',
    'parent',
    'ip',
    'method',
    'url',
    'time',
  ))
    ->sort(array(
    'time' => -1,
  ))
    ->limit($limit);
  $tokens = array();
  foreach ($cursor as $profile) {
    $tokens[] = $this
      ->getData($profile);
  }
  return $tokens;
}