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) {
$profile = $this
->getMongo()
->findOne(array(
'_id' => $token,
'data' => array(
'$exists' => true,
),
));
if (null !== $profile) {
$profile = $this
->createProfileFromData($this
->getData($profile));
}
return $profile;
}