94 return $this->config ?: $this->
getContext()->getConfig();
103 return MediaWikiServices::getInstance()->getStatsdDataFactory();
110 return $this->timing ?: $this->
getContext()->getTiming();
150 if ( $this->wikipage !==
null ) {
154 if ( $this->
title !==
null ) {
155 return $this->
title->canExist();
166 $this->wikipage = $wikiPage;
179 return $this->wikipage ?: $this->
getContext()->getWikiPage();
193 return $this->output ?: $this->
getContext()->getOutput();
216 if ( $language instanceof
Language ) {
217 $this->lang = $language;
218 } elseif ( is_string( $language ) ) {
219 $language = RequestContext::sanitizeLangCode( $language );
220 $obj = Language::factory( $language );
223 throw new MWException( __METHOD__ .
" was passed an invalid type of data." );
232 return $this->lang ?: $this->
getContext()->getLanguage();
239 $this->skin = clone
$skin;
247 return $this->skin ?: $this->
getContext()->getSkin();
262 public function msg( $key ) {
263 $args = func_get_args();
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
getContext()
Get the base IContextSource object.
setContext(IContextSource $context)
An IContextSource implementation which will inherit context from another source but allow individual ...
setRequest(WebRequest $request)
setWikiPage(WikiPage $wikiPage)
getWikiPage()
Get the WikiPage object.
__construct(IContextSource $context)
setConfig(Config $config)
canUseWikiPage()
Check whether a WikiPage object can be get with getWikiPage().
setOutput(OutputPage $output)
msg( $key)
Get a message using the current context.
Internationalisation code.
This class should be covered by a general architecture document which does not exist as of January 20...
The main skin class which provides methods and properties for all other skins.
An interface to help developers measure the performance of their applications.
Represents a title within MediaWiki.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
Class representing a MediaWiki article and history.
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 and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same user
Wikitext formatted, in the key only.
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
returning false will NOT prevent logging a wrapping ErrorException create2 Corresponds to logging log_action database field and which is displayed in the UI similar to $comment or false if none Defaults to false if not set multiOccurrence Can this option be passed multiple times Defaults to false if not set this hook should only be used to add variables that depend on the current page request
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
Interface for configuration instances.
Interface for objects which can provide a MediaWiki context on request.