75 $this->debug =
$request->getFuzzyBool(
79 $this->only =
$request->getRawVal(
'only',
null );
81 $this->raw =
$request->getFuzzyBool(
'raw' );
84 $this->image =
$request->getRawVal(
'image' );
85 $this->variant =
$request->getRawVal(
'variant' );
88 $this->skin =
$request->getRawVal(
'skin' );
89 $skinnames = Skin::getSkinNames();
91 if ( !$this->skin || !isset( $skinnames[$this->skin] ) ) {
108 $exploded = explode(
'|',
$modules );
109 foreach ( $exploded
as $group ) {
110 if ( strpos( $group,
',' ) ===
false ) {
116 $pos = strrpos( $group,
'.' );
117 if ( $pos ===
false ) {
122 $prefix = substr( $group, 0, $pos );
123 $suffixes = explode(
',', substr( $group, $pos + 1 ) );
124 foreach ( $suffixes
as $suffix ) {
140 MediaWikiServices::getInstance()->getMainConfig(),
141 LoggerFactory::getInstance(
'resourceloader' )
178 if ( $this->language ===
null ) {
183 if ( !Language::isValidBuiltInCode(
$lang ) ) {
186 $this->language =
$lang;
195 if ( $this->direction ===
null ) {
196 $this->direction = $this->
getRequest()->getRawVal(
'dir' );
197 if ( !$this->direction ) {
199 $this->direction = Language::factory( $this->
getLanguage() )->getDir();
228 public function msg( $key ) {
234 ->title( Title::newFromText(
'Dwimmerlaik' ) );
244 if ( $this->userObj ===
null ) {
251 $this->userObj =
new User;
316 if ( $this->imageObj ===
null ) {
317 $this->imageObj =
false;
319 if ( !$this->image ) {
333 $image = $module->getImage( $this->image, $this );
364 return $this->
getOnly() ===
null || $this->
getOnly() ===
'scripts';
371 return $this->
getOnly() ===
null || $this->
getOnly() ===
'styles';
378 return $this->
getOnly() ===
null;
393 if ( !isset( $this->hash ) ) {
394 $this->hash = implode(
'|', [
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
WebRequest clone which takes values from a provided array.
Object passed around to modules which contains information about the state of a specific loader reque...
__construct(ResourceLoader $resourceLoader, WebRequest $request)
getImageObj()
If this is a request for an image, get the ResourceLoaderImage object.
msg( $key)
Get a Message object with context set.
getUserObj()
Get the possibly-cached User object for the specified username.
getHash()
All factors that uniquely identify this request, except 'modules'.
static newDummyContext()
Return a dummy ResourceLoaderContext object suitable for passing into things that don't "really" need...
static expandModuleNames( $modules)
Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to an array of module names like ‘[ 'jq...
getContentOverrideCallback()
Return the replaced-content mapping callback.
ResourceLoader module for generated and embedded images.
Dynamic JavaScript and CSS resource loading system.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
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
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.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account incomplete not yet checked for validity & $retval
returning false will NOT prevent logging a wrapping ErrorException instead of letting the login form give the generic error message that the account does not exist For when the account has been renamed or deleted or an array to pass a message key and parameters create2 Corresponds to logging log_action database field and which is displayed in the UI similar to $comment this hook should only be used to add variables that depend on the current page request
if the prop value should be in the metadata multi language array format
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
this hook is for auditing only or null if authentication failed before getting that far $username
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 localizing messages in MediaWiki.
if(!isset( $args[0])) $lang