public function getCookies(bool $includeDeletedCookies = false) : array
    {
        $cookies = [];

        foreach ($this->cookies as $domain => $cookiesByDomain) {
            foreach ($cookiesByDomain as $path => $cookiesByPath) {
                /**
                 * @var string $name
                 * @var Cookie $cookie
                 */
                foreach ($cookiesByPath as $name => $cookie) {
                    // Only include active cookies
                    if ($includeDeletedCookies || $cookie->getExpiration() >= time()) {
                        $cookies[] = $cookie;
                    }
                }
            }
        }

        return $cookies;
    }
public function getCookies(bool $includeDeletedCookies = false) : array
    {
        $cookies = [];

        foreach ($this->cookies as $domain => $cookiesByDomain) {
            foreach ($cookiesByDomain as $path => $cookiesByPath) {
                /**
                 * @var string $name
                 * @var Cookie $cookie
                 */
                foreach ($cookiesByPath as $name => $cookie) {
                    // Only include active cookies
                    if ($includeDeletedCookies || $cookie->getExpiration() >= time()) {
                        $cookies[] = $cookie;
                    }
                }
            }
        }

        return $cookies;
    }
public function getCookies ( bool $ includeDeletedCookies = false ) : array { $ cookies = [ ] ; foreach ( $ this -> cookies as $ domain => $ cookiesByDomain ) { foreach ( $ cookiesByDomain as $ path => $ cookiesByPath ) { /**
                 * @var string $name
                 * @var Cookie $cookie
                 */ foreach ( $ cookiesByPath as $ name => $ cookie ) { // Only include active cookies if ( $ includeDeletedCookies || $ cookie -> getExpiration ( ) >= time ( ) ) { $ cookies [ ] = $ cookie ; } } } } return $ cookies ; }
Gets a list of all the active cookies

@param bool $includeDeletedCookies Whether or not to include deleted cookies
@return Cookie[] The list of all the set cookies
Gets a list of all the active cookies