|
MediaWiki master
|
Factory class for CentralIdLookup. More...
Public Member Functions | |
| __construct (ServiceOptions $options, private readonly ObjectFactory $objectFactory, private readonly UserIdentityLookup $userIdentityLookup, private readonly UserFactory $userFactory) | |
| getDefaultProviderId () | |
| Get the ID of the default central ID provider. | |
| getLookup (?string $providerId=null) | |
| Get an instance of a CentralIdLookup. | |
| getNonLocalLookup (?string $providerID=null) | |
| Returns a CentralIdLookup that is guaranteed to be non-local. | |
| getProviderIds () | |
| Get the IDs of the registered central ID lookup providers. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Factory class for CentralIdLookup.
Creates instances based on their definitions in the CentralIdLookupProviders extension.json field.
Definition at line 26 of file CentralIdLookupFactory.php.
| MediaWiki\User\CentralId\CentralIdLookupFactory::__construct | ( | ServiceOptions | $options, |
| private readonly ObjectFactory | $objectFactory, | ||
| private readonly UserIdentityLookup | $userIdentityLookup, | ||
| private readonly UserFactory | $userFactory ) |
| MediaWiki\User\CentralId\CentralIdLookupFactory::getDefaultProviderId | ( | ) |
Get the ID of the default central ID provider.
Definition at line 69 of file CentralIdLookupFactory.php.
| MediaWiki\User\CentralId\CentralIdLookupFactory::getLookup | ( | ?string | $providerId = null | ) |
Get an instance of a CentralIdLookup.
| string | null | $providerId | Provider ID from $wgCentralIdLookupProviders or null to use the provider configured in $wgCentralIdLookupProvider |
| InvalidArgumentException | if $providerId is not properly configured |
Definition at line 81 of file CentralIdLookupFactory.php.
| MediaWiki\User\CentralId\CentralIdLookupFactory::getNonLocalLookup | ( | ?string | $providerID = null | ) |
Returns a CentralIdLookup that is guaranteed to be non-local.
If no such guarantee can be made, returns null.
If this function returns a non-null CentralIdLookup, that lookup is expected to provide IDs that are shared with some set of other wikis. However, you should still be cautious when using those IDs, as they will not necessarily work with all other wikis, and it can be hard to tell if another wiki is in the same set as this one or not.
| string | null | $providerID | Provider ID from $wgCentralIdLookupProviders or null to use the provider configured in $wgCentralIdLookupProvider |
| InvalidArgumentException | if $providerId is not properly configured |
Definition at line 113 of file CentralIdLookupFactory.php.
| MediaWiki\User\CentralId\CentralIdLookupFactory::getProviderIds | ( | ) |
Get the IDs of the registered central ID lookup providers.
Definition at line 61 of file CentralIdLookupFactory.php.
| const MediaWiki\User\CentralId\CentralIdLookupFactory::CONSTRUCTOR_OPTIONS |
Definition at line 31 of file CentralIdLookupFactory.php.