You are here

public function RedisProfilerStorage::read in Zircon Profile 8

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

Reads data associated with the given token.

The method returns false if the token does not exist in the storage.

Parameters

string $token A token:

Return value

Profile The profile associated with token

Overrides ProfilerStorageInterface::read

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

File

vendor/symfony/http-kernel/Profiler/RedisProfilerStorage.php, line 143

Class

RedisProfilerStorage
RedisProfilerStorage stores profiling information in Redis.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

public function read($token) {
  if (empty($token)) {
    return false;
  }
  $profile = $this
    ->getValue($this
    ->getItemName($token), self::REDIS_SERIALIZER_PHP);
  if (false !== $profile) {
    $profile = $this
      ->createProfileFromData($token, $profile);
  }
  return $profile;
}