private function MongoDbProfilerStorage::buildQuery in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Profiler/MongoDbProfilerStorage.php \Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage::buildQuery()
Parameters
string $ip:
string $url:
string $method:
int $start:
int $end:
Return value
array
File
- vendor/
symfony/ http-kernel/ Profiler/ MongoDbProfilerStorage.php, line 170
Class
Namespace
Symfony\Component\HttpKernel\ProfilerCode
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;
}