public function PdoProfilerStorage::find in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php \Symfony\Component\HttpKernel\Profiler\PdoProfilerStorage::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/ PdoProfilerStorage.php, line 47
Class
- PdoProfilerStorage
- Base PDO storage for profiling information in a PDO database.
Namespace
Symfony\Component\HttpKernel\ProfilerCode
public function find($ip, $url, $limit, $method, $start = null, $end = null) {
if (null === $start) {
$start = 0;
}
if (null === $end) {
$end = time();
}
list($criteria, $args) = $this
->buildCriteria($ip, $url, $start, $end, $limit, $method);
$criteria = $criteria ? 'WHERE ' . implode(' AND ', $criteria) : '';
$db = $this
->initDb();
$tokens = $this
->fetch($db, 'SELECT token, ip, method, url, time, parent, status_code FROM sf_profiler_data ' . $criteria . ' ORDER BY time DESC LIMIT ' . (int) $limit, $args);
$this
->close($db);
return $tokens;
}