MediaWiki REL1_28
Go to the documentation of this file.
35 private $base;
43 public function __construct( WebRequest $base, $data, $wasPosted = false ) {
44 $this->base = $base;
45 parent::__construct( $data, $wasPosted );
46 }
48 public function getCookie( $key, $prefix = null, $default = null ) {
49 return $this->base->getCookie( $key, $prefix, $default );
50 }
52 public function checkSessionCookie() {
53 return $this->base->checkSessionCookie();
54 }
56 public function getHeader( $name, $flags = 0 ) {
57 return $this->base->getHeader( $name, $flags );
58 }
60 public function getAllHeaders() {
61 return $this->base->getAllHeaders();
62 }
64 public function getSession() {
65 return $this->base->getSession();
66 }
68 public function getSessionData( $key ) {
69 return $this->base->getSessionData( $key );
70 }
72 public function setSessionData( $key, $data ) {
73 $this->base->setSessionData( $key, $data );
74 }
76 public function getAcceptLang() {
77 return $this->base->getAcceptLang();
78 }
80 public function getIP() {
81 return $this->base->getIP();
82 }
84 public function getProtocol() {
85 return $this->base->getProtocol();
86 }
88 public function getElapsedTime() {
89 return $this->base->getElapsedTime();
90 }
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base reque...
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.
Get the number of seconds to have elapsed since request start, in fractional seconds,...
getSessionData( $key)
Get data from the session.
Parse the Accept-Language header sent by the client into an array.
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)
Returns true if the request has a persistent session.
Get an array containing all request headers.
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:2710
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:304
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37