public function 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:

Return value

array An array of tokens

Overrides ProfilerStorageInterface::find

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php, line 47

Class

PdoProfilerStorage
Base PDO storage for profiling information in a PDO database.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

public function find($ip, $url, $limit, $method) {
  list($criteria, $args) = $this
    ->buildCriteria($ip, $url, $limit, $method);
  $criteria = $criteria ? 'WHERE ' . implode(' AND ', $criteria) : '';
  $db = $this
    ->initDb();
  $tokens = $this
    ->fetch($db, 'SELECT token, ip, method, url, time, parent FROM sf_profiler_data ' . $criteria . ' ORDER BY time DESC LIMIT ' . (int) $limit, $args);
  $this
    ->close($db);
  return $tokens;
}