Go to the documentation of this file.
38 $this->
set(
$value, $attr );
53 public function set(
$value, $attr ) {
56 if ( isset( $attr[
'expires'] ) ) {
57 $this->isSessionKey =
false;
58 $this->expires = strtotime( $attr[
'expires'] );
61 if ( isset( $attr[
'path'] ) ) {
62 $this->path = $attr[
'path'];
67 if ( isset( $attr[
'domain'] ) ) {
68 if ( self::validateCookieDomain( $attr[
'domain'] ) ) {
69 $this->domain = $attr[
'domain'];
72 throw new MWException(
'You must specify a domain.' );
94 if ( substr(
$domain, -1 ) ==
'.' ) {
101 if ( preg_match(
'/^[0-9.]+$/',
$domain ) ) {
102 if ( count( $dc ) != 4 ) {
106 if ( ip2long(
$domain ) ===
false ) {
110 if ( $originDomain ==
null || $originDomain ==
$domain ) {
118 if ( ( count( $dc ) == 2 && strlen( $dc[0] ) <= 2 )
119 || ( count( $dc ) == 3 && strlen( $dc[0] ) ==
"" && strlen( $dc[1] ) <= 2 ) ) {
122 if ( ( count( $dc ) == 2 || ( count( $dc ) == 3 && $dc[0] ==
'' ) )
123 && preg_match(
'/(com|net|org|gov|edu)\...$/',
$domain ) ) {
128 if ( $originDomain !=
null ) {
129 if ( substr(
$domain, 0, 1 ) !=
'.' &&
$domain != $originDomain ) {
133 if ( substr(
$domain, 0, 1 ) ==
'.'
174 || ( strlen(
$domain ) > strlen( $this->domain )
175 && substr( $this->domain, 0, 1 ) ==
'.'
179 -strlen( $this->domain ),
180 strlen( $this->domain ),
196 return ( $this->path && substr_compare( $this->path,
$path, 0, strlen( $this->path ) ) == 0 );
203 return $this->isSessionKey || $this->expires > time();
218 $index = strtoupper(
$name );
220 if ( isset( $this->cookie[$index] ) ) {
221 $this->cookie[$index]->set(
$value, $attr );
234 foreach ( $this->cookie
as $c ) {
253 $len = strlen(
'Set-Cookie:' );
255 if ( substr_compare(
'Set-Cookie:',
$cookie, 0, $len,
true ) === 0 ) {
259 $bit = array_map(
'trim', explode(
';',
$cookie ) );
261 if ( count( $bit ) >= 1 ) {
265 foreach ( $bit
as $piece ) {
266 $parts = explode(
'=', $piece );
267 if ( count( $parts ) > 1 ) {
268 $attr[strtolower( $parts[0] )] = $parts[1];
270 $attr[strtolower( $parts[0] )] =
true;
274 if ( !isset( $attr[
'domain'] ) ) {
275 $attr[
'domain'] = $domain;
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
foreach( $res as $row) $serialized
__construct( $name, $value, $attr)
setCookie( $name, $value, $attr)
Set a cookie in the cookie jar.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
return false to override stock group removal can be modified modifiable will be added to $_SESSION & $cookies
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
Allows to change the fields on the form that will be generated $name
static validateCookieDomain( $domain, $originDomain=null)
Return the true if the cookie is valid is valid.
serializeToHttpRequest( $path, $domain)
Serialize the cookie jar into a format useful for HTTP Request headers.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
serializeToHttpRequest( $path, $domain)
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
parseCookieResponseHeader( $cookie, $domain)
Parse the content of an Set-Cookie HTTP Response header.