Jump to content

Manual:$wgCentralIdLookupProviders

From mediawiki.org
This page is a translated version of the page Manual:$wgCentralIdLookupProviders and the translation is 33% complete.
Outdated translations are marked like this.
Autenticação: $wgCentralIdLookupProviders
Register central ID lookup providers.
Introduzida na versão:1.27.0 (Gerrit change 254300; git #d032bb52)
Removida na versão:ainda em uso
Valores permitidos:(array of Provider ID's to ObjectFactory specifications)
Valor por omissão:(see below)

Detalhes

Utilizado para definir o que as classes implementam $CentralIdLookup para várias miradas acima de serviços.

Key is the provider ID, value is a specification for ObjectFactory .

Default values

Versão MediaWiki:
1.42
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
			'HideUserUtils',
		]
	],
];
Versão MediaWiki:
1.41
Gerrit change 925722
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
		]
	],
];
Versões do MediaWiki:
1.37 – 1.40
Gerrit change 700991
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancer',
		]
	],
];
Versões do MediaWiki:
1.31 – 1.36
$wgCentralIdLookupProviders = [
	'local' => [ 'class' => LocalIdLookup::class ],
];
Versões do MediaWiki:
1.27 – 1.30
$wgCentralIdLookupProviders = [
	'local' => [ 'class' => 'LocalIdLookup' ],
];

Exemplo

$wgCentralIdLookupProviders['mycustom'] = [
    'class' => 'MyCustomCentralIdLookup',
    'args' => [ 'arg1', 'arg2' ],
];

or, if the extension uses extension registration (preferable):

{
    //...
    "CentralIdLookupProviders": {
        "mycustom": {
            "class": "MyCustomCentralIdLookup",
            "args": [ "arg1", "arg2" ]
    },
    //...
}

This will create an object with new MyCustomCentralIdLookup( 'arg1', 'arg2' ), and register it as a central ID lookup service.

Ver também