Reads data associated with the given token.
The method returns false if the token does not exists in the storage.
string $token A token:
Profile The profile associated with token
Overrides ProfilerStorageInterface::read
public function read($token) {
$db = $this
->initDb();
$args = array(
':token' => $token,
);
$data = $this
->fetch($db, 'SELECT data, parent, ip, method, url, time FROM sf_profiler_data WHERE token = :token LIMIT 1', $args);
$this
->close($db);
if (isset($data[0]['data'])) {
return $this
->createProfileFromData($token, $data[0]);
}
return null;
}