40 $index = strtoupper( $name );
42 if ( isset( $this->cookie[$index] ) ) {
43 $this->cookie[$index]->set(
$value, $attr );
45 $this->cookie[$index] =
new Cookie( $name,
$value, $attr );
58 foreach ( $this->cookie as $c ) {
59 $serialized = $c->serializeToHttpRequest( $path, $domain );
66 return implode(
'; ', $cookies );
77 $len = strlen(
'Set-Cookie:' );
79 if ( substr_compare(
'Set-Cookie:',
$cookie, 0, $len,
true ) === 0 ) {
83 $bit = array_map(
'trim', explode(
';',
$cookie ) );
85 if ( count( $bit ) >= 1 ) {
86 list( $name,
$value ) = explode(
'=', array_shift( $bit ), 2 );
89 foreach ( $bit as $piece ) {
90 $parts = explode(
'=', $piece );
91 if ( count( $parts ) > 1 ) {
92 $attr[strtolower( $parts[0] )] = $parts[1];
94 $attr[strtolower( $parts[0] )] =
true;
98 if ( !isset( $attr[
'domain'] ) ) {
99 $attr[
'domain'] = $domain;
Cookie jar to use with MWHttpRequest.
setCookie( $name, $value, $attr)
Set a cookie in the cookie jar.
serializeToHttpRequest( $path, $domain)
parseCookieResponseHeader( $cookie, $domain)
Parse the content of an Set-Cookie HTTP Response header.
static validateCookieDomain( $domain, $originDomain=null)
Return the true if the cookie is valid is valid.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
foreach( $res as $row) $serialized