Returns the cookie collection.
The cookie collection contains the cookies associated with HTTP message.
@return CookieCollection|Cookie[] the cookie collection.
767118
public function getCookies()
    {
        if (!is_object($this->_cookies)) {
            $cookieCollection = new CookieCollection();
            if (is_array($this->_cookies)) {
                foreach ($this->_cookies as $cookie) {
                    if (!is_object($cookie)) {
                        $cookie = new Cookie($cookie);
                    }
                    $cookieCollection->add($cookie);
                }
            }
            $this->_cookies = $cookieCollection;
        }
        return $this->_cookies;
    }
486924
protected function parseCookies ()
    {
        $cookie = '';

        foreach( $this->cookies as $name => $value )
            $cookie .= $name . '=' . $value . '; ';

        return rtrim( $cookie, ';' );
    }
1005799
public function getCollection()
    {
        if (! isset($this->collection)) {
            return str_replace(
                '\\', '', Str::snake(Str::plural(class_basename($this)))
            );
        }

        return $this->collection;
    }
97932
public Cookie[] getCookies()
    {
        if (_cookies != null && _cookiesExtracted) return _cookies;

        try
        {
            // Handle no cookies
            if (!_header.containsKey(HttpFields.__Cookie))
            {
                _cookies = __noCookies;
                _cookiesExtracted = true;
                _lastCookies = null;
                return _cookies;
            }

            // Check if cookie headers match last cookies
            if (_lastCookies != null)
            {
                int last = 0;
                Enumeration enm = _header.getValues(HttpFields.__Cookie);
                while (enm.hasMoreElements())
                {
                    String c = (String) enm.nextElement();
                    if (last >= _lastCookies.length || !c.equals(_lastCookies[last]))
                    {
                        _lastCookies = null;
                        break;
                    }
                    last++;
                }
                if (_lastCookies != null)
                {
                    _cookiesExtracted = true;
                    return _cookies;
                }
            }

            // Get ready to parse cookies (Expensive!!!)
            Object cookies = null;
            Object lastCookies = null;

            int version = 0;
            Cookie cookie = null;

            // For each cookie header
            Enumeration enm = _header.getValues(HttpFields.__Cookie);
            while (enm.hasMoreElements())
            {
                // Save a copy of the unparsed header as cache.
                String hdr = enm.nextElement().toString();
                lastCookies = LazyList.add(lastCookies, hdr);

                // Parse the header
                QuotedStringTokenizer tok = new QuotedStringTokenizer(hdr, ",;", false, false);
                tok.setSingle(false);
                while (tok.hasMoreElements())
                {
                    String c = (String) tok.nextElement();
                    if (c == null) continue;
                    c = c.trim();

                    try
                    {
                        String n;
                        String v;
                        int e = c.indexOf('=');
                        if (e > 0)
                        {
                            n = c.substring(0, e);
                            v = c.substring(e + 1);
                        }
                        else
                        {
                            n = c;
                            v = "";
                        }

                        // Handle quoted values
                        if (version > 0) v = StringUtil.unquote(v);

                        // Ignore $ names
                        if (n.startsWith("$"))
                        {
                            if ("$version".equalsIgnoreCase(n))
                                version = Integer.parseInt(QuotedStringTokenizer.unquoteDouble(v));
                            else if ("$path".equalsIgnoreCase(n) && cookie != null)
                                cookie.setPath(v);
                            else if ("$domain".equalsIgnoreCase(n) && cookie != null)
                                    cookie.setDomain(v);
                            continue;
                        }

                        v = URI.decodePath(v);
                        cookie = new Cookie(n, v);
                        if (version > 0) cookie.setVersion(version);
                        cookies = LazyList.add(cookies, cookie);
                    }
                    catch (Exception ex)
                    {
                        LogSupport.ignore(log, ex);
                    }
                }
            }

            int l = LazyList.size(cookies);
            if (_cookies == null || _cookies.length != l) _cookies = new Cookie[l];
            for (int i = 0; i < l; i++)
                _cookies[i] = (Cookie) LazyList.get(cookies, i);
            _cookiesExtracted = true;

            l = LazyList.size(lastCookies);
            _lastCookies = new String[l];
            for (int i = 0; i < l; i++)
                _lastCookies[i] = (String) LazyList.get(lastCookies, i);

        }
        catch (Exception e)
        {
            log.warn(LogSupport.EXCEPTION, e);
        }

        return _cookies;
    }
925311
function collect() {
		foreach ( $this->_logs as &$log ) {
			if (!is_string($log['message'])) {
				$formated = $this->formatVars($log['message']);
				if ( $formated['exception'] ) {
					$log['label'] = '[ERROR]';
				}
				$log['message'] = $formated[0];
			}
		}
		return array(
			'messages'=>$this->_logs,
			'count'=>count($this->_logs),
		);
	}
406643
public static function all() {

		$cookies = [];

		foreach(static :: $data as $key => $value) {

			if(rtrim(base64_encode(base64_decode($key, true)), '=') === $key) {
				$cookies[base64_decode($key)] = Hash :: decrypt(static :: $data[$key], Application :: get('salt'));
			}
			else {
				$cookies[$key] = $value;
			}
		}

		return $cookies;
	}
1113016
public function getAll(): array
    {
        $response = $this->client->request('GET', $this->client->getConfig('base_uri') . '/groups/');

        $json = json_decode($response->getBody());

        $groupCollection = [];

        foreach ($json->groups as $group) {
            $groupCollection[] = (new GroupType)->fromJson($group);
        }

        return $groupCollection;
    }
466554
public static function all()
    {
        foreach ($_COOKIE as $key => $value) {
            $_COOKIE[$key] = Crypto::decrypt($value);
        }

        return $_COOKIE;
    }
516828
public function getCollections()
    {
        if ($this->collections) {
            return $this->collections;
        }

        $collectionMapper = ($this->container->dataMapper)('CollectionMapper');

        return $this->collections = $collectionMapper->find();
    }
971683
public function getHeaderCollection()
    {
        if ($this->_headerCollection === null) {
            $headerCollection = new HeaderCollection();
            $headerCollection->fromArray($this->defaultHeaders());
            $this->_headerCollection = $headerCollection;
        }
        return $this->_headerCollection;
    }
1252799
public function toArray(): array
    {
        $cookies = [];

        foreach ($this->responseCookies as $key => $cookie) {
            $cookie['expires'] = is_string($cookie['expires']) ?
                        strtotime($cookie['expires']) :
                        (int) $cookie['expires'];

            $cookies[] = ['key' => $key] + $cookie;
        }

        return $cookies;
    }
327377
protected function pullCookies() {
		if (!is_array($this->cookieVars)) {
			$this->cookieVars = $this->request->getCookieParams();
		}
		
		return $this->cookieVars;
	}
235479
@Override
    public List<WSCookie> getCookies() {
        return ahcResponse.getCookies().stream().map(this::asCookie).collect(toList());
    }
307814
public function collect() : array
    {
        $this->readEnv = [];

        $this
            ->fillTravisCi()
            ->fillCircleCi()
            ->fillAppVeyor()
            ->fillJenkins()
            ->fillScrutinizer();

        return $this->readEnv;
    }
291122
public function getResponseCookies()
    {
        if (!is_array($this->responseCookies)) {
            $cookies = $this->getResponseHeader('SET-COOKIE', false);
            $this->responseCookies = array();
            foreach ($cookies as $cookie) {
                $this->responseCookies += $this->parseCookie($cookie);
            }
        }
        return $this->responseCookies;
    }
993289
protected function prepareCookies()
    {
        $cookiesString = '';

        foreach ($this->cookies as $cookie => $value) {
            $cookiesString .= $cookie.'='.$value.'; ';
        }

        return $cookiesString;
    }
378759
public function getAll()
    {
        $command = $this->driver->factoryCommand('cookie', WebDriver_Command::METHOD_GET);
        $all = $this->driver->curl($command)['value'];
        $result = [];
        foreach ($all as $value) {
            $result[$value['value']] = new WebDriver_Object_Cookie_CookieInfo($value);
        }
        return $result;
    }