public function MongoDbProfilerStorage::find in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/Profiler/MongoDbProfilerStorage.php \Symfony\Component\HttpKernel\Profiler\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
- vendor/
symfony/ http-kernel/ Profiler/ MongoDbProfilerStorage.php, line 37
Class
Namespace
Symfony\Component\HttpKernel\ProfilerCode
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',
'status_code',
))
->sort(array(
'time' => -1,
))
->limit($limit);
$tokens = array();
foreach ($cursor as $profile) {
$tokens[] = $this
->getData($profile);
}
return $tokens;
}