MediaWiki master
CookieJar Class Reference

Cookie jar to use with MWHttpRequest. More...

Public Member Functions

 parseCookieResponseHeader ( $cookie, $domain)
 Parse the content of an Set-Cookie HTTP Response header.
 
 serializeToHttpRequest ( $path, $domain)
 
 setCookie ( $name, $value, $attr)
 Set a cookie in the cookie jar.
 

Detailed Description

Cookie jar to use with MWHttpRequest.

Does not handle cookie unsetting.

Definition at line 25 of file CookieJar.php.

Member Function Documentation

◆ parseCookieResponseHeader()

CookieJar::parseCookieResponseHeader ( $cookie,
$domain )

Parse the content of an Set-Cookie HTTP Response header.

Parameters
string$cookie
string$domainCookie's domain
Returns
null

Definition at line 76 of file CookieJar.php.

References setCookie(), and Cookie\validateCookieDomain().

◆ serializeToHttpRequest()

CookieJar::serializeToHttpRequest ( $path,
$domain )
See also
Cookie::serializeToHttpRequest
Parameters
string$path
string$domain
Returns
string

Definition at line 55 of file CookieJar.php.

References $path.

◆ setCookie()

CookieJar::setCookie ( $name,
$value,
$attr )

Set a cookie in the cookie jar.

Make sure only one cookie per-name exists.

See also
Cookie::set()
Parameters
string$name
string$value
array$attr

Definition at line 36 of file CookieJar.php.

Referenced by parseCookieResponseHeader(), and MWHttpRequest\setCookie().


The documentation for this class was generated from the following file: