63 $this->logger = $resourceLoader->
getLogger();
73 $resourceLoader->
getConfig()->get(
'ResourceLoaderDebug' )
75 $this->only = $request->
getVal(
'only', null );
80 $this->image = $request->
getVal(
'image' );
81 $this->variant = $request->
getVal(
'variant' );
87 if ( !$this->
skin || !isset( $skinnames[$this->
skin] ) ) {
88 $this->skin = $resourceLoader->
getConfig()->get(
'DefaultSkin' );
101 $exploded = explode(
'|',
$modules );
102 foreach ( $exploded
as $group ) {
103 if ( strpos( $group,
',' ) ===
false ) {
109 $pos = strrpos( $group,
'.' );
110 if ( $pos ===
false ) {
115 $prefix = substr( $group, 0, $pos );
116 $suffixes = explode(
',', substr( $group, $pos + 1 ) );
117 foreach ( $suffixes
as $suffix ) {
134 LoggerFactory::getInstance(
'resourceloader' )
171 if ( $this->language === null ) {
177 wfDebug(
"Invalid user language code\n" );
181 $this->language =
$lang;
190 if ( $this->direction === null ) {
191 $this->direction = $this->
getRequest()->getVal(
'dir' );
192 if ( !$this->direction ) {
222 return call_user_func_array(
'wfMessage', func_get_args() )
233 if ( $this->userObj === null ) {
238 $this->userObj =
new User;
303 if ( $this->imageObj === null ) {
304 $this->imageObj =
false;
306 if ( !$this->image ) {
320 $image = $module->getImage( $this->image, $this );
335 return $this->
getOnly() === null || $this->
getOnly() ===
'scripts';
342 return $this->
getOnly() === null || $this->
getOnly() ===
'styles';
349 return $this->
getOnly() === null;
364 if ( !isset( $this->hash ) ) {
365 $this->hash = implode(
'|', [
static newFromName($name, $validate= 'valid')
Static factory method for creation from username.
ResourceLoader module for generated and embedded images.
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 array(...
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
msg()
Get a Message object with context set.
if(!isset($args[0])) $lang
getFuzzyBool($name, $default=false)
Fetch a boolean value from the input or return $default if not set.
static getSkinNames()
Fetch the set of available skins.
when a variable name is used in a it is silently declared as a new local masking the global
wfDebug($text, $dest= 'all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
$wgLanguageCode
Site language code.
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.
static isValidBuiltInCode($code)
Returns true if a language code is of a valid form for the purposes of internal customisation of Medi...
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
getVal($name, $default=null)
Fetch a scalar from the input or return $default if it's not set.
static getDefaultInstance()
getUserObj()
Get the possibly-cached User object for the specified 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
this hook is for auditing only or null if authentication failed before getting that far $username
MediaWiki Logger LoggerFactory implements a PSR[0] compatible message logging system Named Psr Log LoggerInterface instances can be obtained from the MediaWiki Logger LoggerFactory::getInstance() static method.MediaWiki\Logger\LoggerFactory expects a class implementing the MediaWiki\Logger\Spi interface to act as a factory for new Psr\Log\LoggerInterface instances.The"Spi"in MediaWiki\Logger\Spi stands for"service provider interface".An SPI is an API intended to be implemented or extended by a third party.This software design pattern is intended to enable framework extension and replaceable components.It is specifically used in the MediaWiki\Logger\LoggerFactory service to allow alternate PSR-3 logging implementations to be easily integrated with MediaWiki.The service provider interface allows the backend logging library to be implemented in multiple ways.The $wgMWLoggerDefaultSpi global provides the classname of the default MediaWiki\Logger\Spi implementation to be loaded at runtime.This can either be the name of a class implementing the MediaWiki\Logger\Spi with a zero argument const ructor or a callable that will return an MediaWiki\Logger\Spi instance.Alternately the MediaWiki\Logger\LoggerFactory MediaWiki Logger LoggerFactory
getHash()
All factors that uniquely identify this request, except 'modules'.
__construct(ResourceLoader $resourceLoader, WebRequest $request)
getImageObj()
If this is a request for an image, get the ResourceLoaderImage object.
this hook is for auditing only etc 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
static factory($code)
Get a cached or new language object for a given language code.
Dynamic JavaScript and CSS resource loading system.
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
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a skin(according to that user's preference)
if the prop value should be in the metadata multi language array format
Object passed around to modules which contains information about the state of a specific loader reque...