Finds profiler tokens for the given criteria.
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:
array An array of tokens
Overrides ProfilerStorageInterface::find
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;
}