38 $services = MediaWikiServices::getInstance();
39 $authManager = AuthManager::singleton();
43 $config,
$services->getContentLanguage(), $authManager,
46 return $preferencesFactory;
53 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
64 return $preferencesFactory->getFormDescriptor(
$user,
$context );
76 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
88 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
223 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
231 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
239 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
249 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
259 throw new Exception( __METHOD__ .
'() is deprecated and does nothing now' );
272 $formClass = PreferencesFormLegacy::class,
276 return $preferencesFactory->getForm(
$user,
$context, $formClass, $remove );
284 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
293 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
302 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
314 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Internationalisation code.
This class has been replaced by the PreferencesFactory service.
static getDefaultPreferencesFactory()
A shim to maintain backwards-compatibility of this class, basically replicating the default behaviour...
static getOptionFromUser( $name, $info, $user)
Pull option from a user account.
static searchPreferences( $user, IContextSource $context, &$defaultPreferences)
static rcPreferences( $user, IContextSource $context, &$defaultPreferences)
static filterIntval( $value, $alldata)
static generateSkinOptions( $user, IContextSource $context)
static loadPreferenceValues( $user, $context, &$defaultPreferences)
Loads existing values for a given array of preferences.
static getSaveBlacklist()
static filesPreferences( $user, IContextSource $context, &$defaultPreferences)
static getImageSizes(IContextSource $context)
static getPreferences( $user, IContextSource $context)
static getTimeZoneList(Language $language)
Get a list of all time zones.
static watchlistPreferences( $user, IContextSource $context, &$defaultPreferences)
static datetimePreferences( $user, IContextSource $context, &$defaultPreferences)
static getDateOptions(IContextSource $context)
static miscPreferences( $user, IContextSource $context, &$defaultPreferences)
Dummy, kept for backwards-compatibility.
static profilePreferences( $user, IContextSource $context, &$defaultPreferences)
static cleanSignature( $signature, $alldata, $form)
static getFormObject( $user, IContextSource $context, $formClass=PreferencesFormLegacy::class, array $remove=[])
static renderingPreferences( $user, IContextSource $context, &$defaultPreferences)
static getTimezoneOptions(IContextSource $context)
static skinPreferences( $user, IContextSource $context, &$defaultPreferences)
static getThumbSizes(IContextSource $context)
static filterTimezoneInput( $tz, $alldata)
static validateSignature( $signature, $alldata, $form)
static editingPreferences( $user, IContextSource $context, &$defaultPreferences)
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title e g db for database replication lag or jobqueue for job queue size converted to pseudo seconds It is possible to add more fields and they will be returned to the user in the API response after the basic globals have been set but before ordinary actions take place or wrap services the preferred way to define a new service is the $wgServiceWiringFiles array $services
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
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 $user
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 objects which can provide a MediaWiki context on request.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))