Manual:$wgCentralIdLookupProviders/pt

From Linux Web Expert

Revision as of 13:34, 10 April 2024 by imported>Vinickw
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<translate> Authentication</translate>: $wgCentralIdLookupProviders
Register central ID lookup providers.
<translate> Introduced in version:</translate>1.27.0 (Gerrit change 254300; git #d032bb52)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(array of Provider ID's to ObjectFactory specifications)
<translate> Default value:</translate>(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

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.42
<translate> MediaWiki version:</translate>
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
			'HideUserUtils',
		]
	],
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.41</tvar> is stable version</translate>">
1.41
Gerrit change 925722
<translate> MediaWiki version:</translate>
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
		]
	],
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.40</tvar> is legacy version</translate>">
1.37 – 1.40
Gerrit change 700991
<translate> MediaWiki versions:</translate>
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancer',
		]
	],
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.36</tvar> is unsupported version</translate>">
1.31 – 1.36
<translate> MediaWiki versions:</translate>
$wgCentralIdLookupProviders = [
	'local' => [ 'class' => LocalIdLookup::class ],
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.30</tvar> is unsupported version</translate>">
1.27 – 1.30
<translate> MediaWiki versions:</translate>
$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