protected function composeFields($id, $data)
    {
        $fields = [
            'data' => $data,
        ];
        if ($this->writeCallback !== null) {
            $fields = array_merge(
                $fields,
                call_user_func($this->writeCallback, $this)
            );
            if (!is_string($fields['data'])) {
                $_SESSION = $fields['data'];
                $fields['data'] = session_encode();
            }
        }
        // ensure 'id' and 'expire' are never affected by [[writeCallback]]
        $fields = array_merge($fields, [
            'id' => $id,
            'expire' => time() + $this->getTimeout(),
        ]);
        return $fields;
    }
protected function composeFields($id, $data)
    {
        $fields = [
            'data' => $data,
        ];
        if ($this->writeCallback !== null) {
            $fields = array_merge(
                $fields,
                call_user_func($this->writeCallback, $this)
            );
            if (!is_string($fields['data'])) {
                $_SESSION = $fields['data'];
                $fields['data'] = session_encode();
            }
        }
        // ensure 'id' and 'expire' are never affected by [[writeCallback]]
        $fields = array_merge($fields, [
            'id' => $id,
            'expire' => time() + $this->getTimeout(),
        ]);
        return $fields;
    }
protected function composeFields ( $ id , $ data ) { $ fields = [ 'data' => $ data , ] ; if ( $ this -> writeCallback !== null ) { $ fields = array_merge ( $ fields , call_user_func ( $ this -> writeCallback , $ this ) ) ; if ( ! is_string ( $ fields [ 'data' ] ) ) { $ _SESSION = $ fields [ 'data' ] ; $ fields [ 'data' ] = session_encode ( ) ; } } // ensure 'id' and 'expire' are never affected by [[writeCallback]] $ fields = array_merge ( $ fields , [ 'id' => $ id , 'expire' => time ( ) + $ this -> getTimeout ( ) , ] ) ; return $ fields ; }
Composes storage field set for session writing.
@param string $id session id
@param string $data session data
@return array storage fields
Composes storage field set for session writing .