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:
array An array of tokens
Overrides ProfilerStorageInterface::find
public function find($ip, $url, $limit, $method) {
$cursor = $this
->getMongo()
->find($this
->buildQuery($ip, $url, $method), 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;
}