protected function extractData($fields)
{
if ($this->readCallback !== null) {
if (!isset($fields['data'])) {
$fields['data'] = '';
}
$extraData = call_user_func($this->readCallback, $fields);
if (!empty($extraData)) {
session_decode($fields['data']);
$_SESSION = array_merge((array) $_SESSION, (array) $extraData);
return session_encode();
}
return $fields['data'];
} else {
return isset($fields['data']) ? $fields['data'] : '';
}
}