/** * Imports data into the profiler storage. * * @param string $data A data string as exported by the export() method * * @return Profile A Profile instance */ public function import($data) { $profile = unserialize(base64_decode($data)); if ($this->storage->read($profile->getToken())) { return false; } $this->saveProfile($profile); return $profile; }
/** * Imports data into the profiler storage. * * @param string $data A data string as exported by the export() method * * @return Profile A Profile instance * * @deprecated since Symfony 2.8, to be removed in 3.0. */ public function import($data) { @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); $profile = unserialize(base64_decode($data)); if ($this->storage->read($profile->getToken())) { return false; } $this->saveProfile($profile); return $profile; }
/** * Loads the Profile for the given token. * * @param string $token A token * * @return Profile A Profile instance */ public function loadProfile($token) { return $this->storage->read($token); }