You are here

public function Profiler::import in Zircon Profile 8.0

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

Imports data into the profiler storage.

Parameters

string $data A data string as exported by the export() method:

Return value

Profile A Profile instance

File

vendor/symfony/http-kernel/Profiler/Profiler.php, line 153

Class

Profiler
Profiler.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

public function import($data) {
  $profile = unserialize(base64_decode($data));
  if ($this->storage
    ->read($profile
    ->getToken())) {
    return false;
  }
  $this
    ->saveProfile($profile);
  return $profile;
}