You are here

protected function PdoProfilerStorage::readChildren in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php \Symfony\Component\HttpKernel\Profiler\PdoProfilerStorage::readChildren()

Reads the child profiles for the given token.

Parameters

string $token The parent token:

string $parent The parent instance:

Return value

Profile[] An array of Profile instance

1 call to PdoProfilerStorage::readChildren()
PdoProfilerStorage::createProfileFromData in vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php

File

vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php, line 230

Class

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

Namespace

Symfony\Component\HttpKernel\Profiler

Code

protected function readChildren($token, $parent) {
  $db = $this
    ->initDb();
  $data = $this
    ->fetch($db, 'SELECT token, data, ip, method, url, time FROM sf_profiler_data WHERE parent = :token', array(
    ':token' => $token,
  ));
  $this
    ->close($db);
  if (!$data) {
    return array();
  }
  $profiles = array();
  foreach ($data as $d) {
    $profiles[] = $this
      ->createProfileFromData($d['token'], $d, $parent);
  }
  return $profiles;
}