MediaWiki REL1_30
DerivativeRequest.php
Go to the documentation of this file.
1<?php
35 private $base;
36
43 public function __construct( WebRequest $base, $data, $wasPosted = false ) {
44 $this->base = $base;
45 parent::__construct( $data, $wasPosted );
46 }
47
48 public function getCookie( $key, $prefix = null, $default = null ) {
49 return $this->base->getCookie( $key, $prefix, $default );
50 }
51
52 public function getHeader( $name, $flags = 0 ) {
53 return $this->base->getHeader( $name, $flags );
54 }
55
56 public function getAllHeaders() {
57 return $this->base->getAllHeaders();
58 }
59
60 public function getSession() {
61 return $this->base->getSession();
62 }
63
64 public function getSessionData( $key ) {
65 return $this->base->getSessionData( $key );
66 }
67
68 public function setSessionData( $key, $data ) {
69 $this->base->setSessionData( $key, $data );
70 }
71
72 public function getAcceptLang() {
73 return $this->base->getAcceptLang();
74 }
75
76 public function getIP() {
77 return $this->base->getIP();
78 }
79
80 public function getProtocol() {
81 return $this->base->getProtocol();
82 }
83
84 public function getElapsedTime() {
85 return $this->base->getElapsedTime();
86 }
87}
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base reque...
getIP()
Work out the IP address based on various globals For trusted proxies, use the XFF client IP (first of...
setSessionData( $key, $data)
Set session data.
getHeader( $name, $flags=0)
Get a request header, or false if it isn't set.
getElapsedTime()
Get the number of seconds to have elapsed since request start, in fractional seconds,...
getSessionData( $key)
Get data from the session.
getAcceptLang()
Parse the Accept-Language header sent by the client into an array.
getSession()
Return the session for this request.
getCookie( $key, $prefix=null, $default=null)
Get a cookie from the $_COOKIE jar.
__construct(WebRequest $base, $data, $wasPosted=false)
getAllHeaders()
Get an array containing all request headers.
getProtocol()
Get the current URL protocol (http or https)
WebRequest clone which takes values from a provided array.
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
it s the revision text itself In either if gzip is the revision text is gzipped $flags
Definition hooks.txt:2805