Lines Matching refs:cookie

29         foreach ($cookieArray as $cookie) {
30 if (!($cookie instanceof SetCookie)) {
31 $cookie = new SetCookie($cookie);
33 $this->setCookie($cookie);
72 * @param SetCookie $cookie Being evaluated.
77 SetCookie $cookie, argument
80 if ($cookie->getExpires() || $allowSessionCookies) {
81 if (!$cookie->getDiscard()) {
101 foreach ($this->cookies as $cookie) {
102 if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) {
103 return $cookie;
112 return array_map(function (SetCookie $cookie) {
113 return $cookie->toArray();
125 function (SetCookie $cookie) use ($domain) {
126 return !$cookie->matchesDomain($domain);
132 function (SetCookie $cookie) use ($path, $domain) {
133 return !($cookie->matchesPath($path) &&
134 $cookie->matchesDomain($domain));
140 function (SetCookie $cookie) use ($path, $domain, $name) {
141 return !($cookie->getName() == $name &&
142 $cookie->matchesPath($path) &&
143 $cookie->matchesDomain($domain));
153 function (SetCookie $cookie) {
154 return !$cookie->getDiscard() && $cookie->getExpires();
159 public function setCookie(SetCookie $cookie) argument
163 $name = $cookie->getName();
169 $result = $cookie->validate();
174 $this->removeCookieIfEmpty($cookie);
184 if ($c->getPath() != $cookie->getPath() ||
185 $c->getDomain() != $cookie->getDomain() ||
186 $c->getName() != $cookie->getName()
193 if (!$cookie->getDiscard() && $c->getDiscard()) {
200 if ($cookie->getExpires() > $c->getExpires()) {
206 if ($cookie->getValue() !== $c->getValue()) {
215 $this->cookies[] = $cookie;
235 foreach ($cookieHeader as $cookie) {
236 $sc = SetCookie::fromString($cookie);
283 foreach ($this->cookies as $cookie) {
284 if ($cookie->matchesPath($path) &&
285 $cookie->matchesDomain($host) &&
286 !$cookie->isExpired() &&
287 (!$cookie->getSecure() || $scheme === 'https')
289 $values[] = $cookie->getName() . '='
290 . $cookie->getValue();
303 * @param SetCookie $cookie
305 private function removeCookieIfEmpty(SetCookie $cookie) argument
307 $cookieValue = $cookie->getValue();
310 $cookie->getDomain(),
311 $cookie->getPath(),
312 $cookie->getName()