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'];
        }

        return $fields['data'] ?? '';
    }
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'];
        }

        return $fields['data'] ?? '';
    }
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' ] ; } return $ fields [ 'data' ] ?? '' ; }
Extracts session data from storage field set.
@param array $fields storage fields.
@return string session data.
Extracts session data from storage field set .