Lines Matching refs:cookie
77 foreach ($cookies as $cookie) {
80 if (!$this->cookieMatchesTarget($cookie, $urlParts)) {
85 $this->storeCookie($cookie);
87 phpCAS::trace($cookie['name'].' -> '.$cookie['value']);
116 foreach ($this->_cookies as $key => $cookie) {
117 if ($this->cookieMatchesTarget($cookie, $target)) {
118 $matching_cookies[$cookie['name']] = $cookie['value'];
169 $cookie = array(
210 $cookie['expires'] = strtotime($attributeValue);
213 $cookie['max-age'] = (int)$attributeValue;
215 if ($cookie['max-age']) {
216 $cookie['expires'] = time() + $cookie['max-age'];
220 $cookie['expires'] = time() - 1;
224 $cookie['secure'] = true;
235 $cookie[$attributeNameLC] = $attributeValue;
238 $cookie['name'] = $attributeName;
239 $cookie['value'] = $attributeValue;
243 return $cookie;
249 * @param array $cookie A cookie array as created by parseCookieHeaders()
255 protected function storeCookie ($cookie) argument
258 $this->discardCookie($cookie);
259 $this->_cookies[] = $cookie;
266 * @param array $cookie An cookie
272 protected function discardCookie ($cookie) argument
274 if (!isset($cookie['domain'])
275 || !isset($cookie['path'])
276 || !isset($cookie['path'])
282 if ( $cookie['domain'] == $old_cookie['domain']
283 && $cookie['path'] == $old_cookie['path']
284 && $cookie['name'] == $old_cookie['name']
300 foreach ($this->_cookies as $key => $cookie) {
301 if (isset($cookie['expires']) && $cookie['expires'] < time()) {
310 * @param array $cookie An array of cookie attributes.
317 protected function cookieMatchesTarget ($cookie, $target) argument
331 if ($cookie['secure'] && $target['scheme'] != 'https') {
337 if (strpos($cookie['domain'], '.') === 0) {
339 if (substr($cookie['domain'], 1) == $target['host']) {
344 $pos = strripos($target['host'], $cookie['domain']);
349 if ($pos + strlen($cookie['domain']) != strlen($target['host'])) {
363 if (strcasecmp($target['host'], $cookie['domain']) !== 0) {
369 if (isset($cookie['ports'])
370 && !in_array($target['port'], $cookie['ports'])
376 if (strpos($target['path'], $cookie['path']) !== 0) {