public function id($id = null)
    {
        if ($id) {
            if (!$this->isValidId($id)) {
                throw new \InvalidArgumentException('$id may contain only [a-zA-Z0-9-_]');
            }
            if ($this->id) {
                throw new Exception('Cannot set id while session is active');
            }
            $this->requestedId = $id;
        }
        return $this->id;
    }