src/Web/Sessions/Session.php
public function writeSession($data = null, $id = null)
    {
        $id = !isset($id) && isset($this->_sessionId) ? $this->_sessionId : $id;
        if (!isset($id)) {
            return \Reaction\Promise\reject(new Reaction\Exceptions\ErrorException('Param "$id" must be specified in "' . __METHOD__ . '"'));
        }
        if (!isset($data)) {
            $data = $this->data;
        }
        return $this->handler->write($id, $data);
    }
public function writeSession($data = null, $id = null)
    {
        $id = !isset($id) && isset($this->_sessionId) ? $this->_sessionId : $id;
        if (!isset($id)) {
            return \Reaction\Promise\reject(new Reaction\Exceptions\ErrorException('Param "$id" must be specified in "' . __METHOD__ . '"'));
        }
        if (!isset($data)) {
            $data = $this->data;
        }
        return $this->handler->write($id, $data);
    }
Session write handler.
@internal Do not call this method directly.
@param string $id session ID
@param array  $data session data
@return ExtendedPromiseInterface with bool whether session write is successful