[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/ -> WebResponse.php (summary)

Classes used to send headers and cookies back to the user 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.

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

Defines 2 classes

WebResponse:: (2 methods):
  header()
  setcookie()

FauxResponse:: (5 methods):
  header()
  getheader()
  getStatusCode()
  setcookie()
  getcookie()


Class: WebResponse  - X-Ref

Allow programs to request this object from WebRequest::response()
and handle all outputting (or lack of outputting) via it.

header( $string, $replace = true, $http_response_code = null )   X-Ref
Output a HTTP header, wrapper for PHP's header()

param: string $string Header to output
param: bool $replace Replace current similar header
param: null|int $http_response_code Forces the HTTP response code to the specified value.

setcookie( $name, $value, $expire = 0, $options = null )   X-Ref
Set the browser cookie

param: string $name Name of cookie
param: string $value Value to give cookie
param: int|null $expire Unix timestamp (in seconds) when the cookie should expire.
param: array $options Assoc of additional cookie options:

Class: FauxResponse  - X-Ref


header( $string, $replace = true, $http_response_code = null )   X-Ref
Stores a HTTP header

param: string $string Header to output
param: bool $replace Replace current similar header
param: null|int $http_response_code Forces the HTTP response code to the specified value.

getheader( $key )   X-Ref

param: string $key The name of the header to get (case insensitive).
return: string

getStatusCode()   X-Ref
Get the HTTP response code, null if not set

return: int|null

setcookie( $name, $value, $expire = 0, $options = null )   X-Ref

param: string $name Name of cookie
param: string $value Value to give cookie
param: int $expire Number of seconds til cookie expires (Default: 0)
param: array $options Ignored

getcookie( $name )   X-Ref

param: string $name
return: string



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