public function toRequestArray(string $uri = ''): array
    {
        $r = [];
        if (!empty($this->raw)) {
            $priorities = [];
            /** @var $cookie Cookie */
            foreach ($this->raw as $cookie) {
                if ($cookie->isValid($uri)) {
                    //Session cookie or unexpired && match domain path
                    $priority = strlen($cookie->domain); //Record priority, the higher the match, the higher the priority
                    if (!isset($r[$cookie->name]) || $priorities[$cookie->name] < $priority) {
                        //The cookie of the name is not set or the cookie set has a lower priority than the current cookie
                        $r[$cookie->name] = $cookie->value;
                        $priorities[$cookie->name] = $priority;
                    }
                }
            }
        }

        return $r;
    }