public function sessionName($name = null)
    {
        if ($name === null) {
            return session_name();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Session name must be null or a string');
        }
        session_name($name);
    }