[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/ -> Cookie.php (summary)

(no description)

File Size: 291 lines (8 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 2 classes

Cookie:: (7 methods):
  __construct()
  set()
  validateCookieDomain()
  serializeToHttpRequest()
  canServeDomain()
  canServePath()
  isUnExpired()

CookieJar:: (3 methods):
  setCookie()
  serializeToHttpRequest()
  parseCookieResponseHeader()


Class: Cookie  - X-Ref

Cookie for HTTP requests.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
http://www.gnu.org/copyleft/gpl.html

__construct( $name, $value, $attr )   X-Ref
No description

set( $value, $attr )   X-Ref
Sets a cookie.  Used before a request to set up any individual
cookies. Used internally after a request to parse the
Set-Cookie headers.

param: string $value The value of the cookie
param: array $attr Possible key/values:

validateCookieDomain( $domain, $originDomain = null )   X-Ref
Return the true if the cookie is valid is valid.  Otherwise,
false.  The uses a method similar to IE cookie security
described here:
http://kuza55.blogspot.com/2008/02/understanding-cookie-security.html
A better method might be to use a blacklist like
http://publicsuffix.org/

param: string $domain The domain to validate
param: string $originDomain (optional) the domain the cookie originates from
return: bool

serializeToHttpRequest( $path, $domain )   X-Ref
Serialize the cookie jar into a format useful for HTTP Request headers.

param: string $path The path that will be used. Required.
param: string $domain The domain that will be used. Required.
return: string

canServeDomain( $domain )   X-Ref

param: string $domain
return: bool

canServePath( $path )   X-Ref

param: string $path
return: bool

isUnExpired()   X-Ref

return: bool

Class: CookieJar  - X-Ref

setCookie( $name, $value, $attr )   X-Ref
Set a cookie in the cookie jar. Make sure only one cookie per-name exists.

param: string $name
param: string $value
param: array $attr

serializeToHttpRequest( $path, $domain )   X-Ref

param: string $path
param: string $domain
return: string

parseCookieResponseHeader( $cookie, $domain )   X-Ref
Parse the content of an Set-Cookie HTTP Response header.

param: string $cookie
param: string $domain Cookie's domain
return: null



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1