public function allValues($uri, $returnsRawValue = false)
    {
        $this->flushExpiredCookies();

        $parts = array_replace(array('path' => '/'), parse_url($uri));
        $cookies = array();
        foreach ($this->cookieJar as $domain => $pathCookies) {
            if ($domain) {
                $domain = '.'.ltrim($domain, '.');
                if ($domain != substr('.'.$parts['host'], -strlen($domain))) {
                    continue;
                }
            }

            foreach ($pathCookies as $path => $namedCookies) {
                if ($path != substr($parts['path'], 0, strlen($path))) {
                    continue;
                }

                foreach ($namedCookies as $cookie) {
                    if ($cookie->isSecure() && 'https' != $parts['scheme']) {
                        continue;
                    }

                    $cookies[$cookie->getName()] = $returnsRawValue ? $cookie->getRawValue() : $cookie->getValue();
                }
            }
        }

        return $cookies;
    }
public function allValues($uri, $returnsRawValue = false)
    {
        $this->flushExpiredCookies();

        $parts = array_replace(array('path' => '/'), parse_url($uri));
        $cookies = array();
        foreach ($this->cookieJar as $domain => $pathCookies) {
            if ($domain) {
                $domain = '.'.ltrim($domain, '.');
                if ($domain != substr('.'.$parts['host'], -strlen($domain))) {
                    continue;
                }
            }

            foreach ($pathCookies as $path => $namedCookies) {
                if ($path != substr($parts['path'], 0, strlen($path))) {
                    continue;
                }

                foreach ($namedCookies as $cookie) {
                    if ($cookie->isSecure() && 'https' != $parts['scheme']) {
                        continue;
                    }

                    $cookies[$cookie->getName()] = $returnsRawValue ? $cookie->getRawValue() : $cookie->getValue();
                }
            }
        }

        return $cookies;
    }
public function allValues ( $ uri , $ returnsRawValue = false ) { $ this -> flushExpiredCookies ( ) ; $ parts = array_replace ( array ( 'path' => '/' ) , parse_url ( $ uri ) ) ; $ cookies = array ( ) ; foreach ( $ this -> cookieJar as $ domain => $ pathCookies ) { if ( $ domain ) { $ domain = '.' . ltrim ( $ domain , '.' ) ; if ( $ domain != substr ( '.' . $ parts [ 'host' ] , - strlen ( $ domain ) ) ) { continue ; } } foreach ( $ pathCookies as $ path => $ namedCookies ) { if ( $ path != substr ( $ parts [ 'path' ] , 0 , strlen ( $ path ) ) ) { continue ; } foreach ( $ namedCookies as $ cookie ) { if ( $ cookie -> isSecure ( ) && 'https' != $ parts [ 'scheme' ] ) { continue ; } $ cookies [ $ cookie -> getName ( ) ] = $ returnsRawValue ? $ cookie -> getRawValue ( ) : $ cookie -> getValue ( ) ; } } } return $ cookies ; }
Returns not yet expired cookie values for the given URI.

@param string $uri             A URI
@param bool   $returnsRawValue Returns raw value or urldecoded value

@return array An array of cookie values
Returns not yet expired cookie values for the given URI .