Class to parse and build external user names.
More...
|
| | __construct ( $usernamePrefix, $assignKnownUsers) |
| |
| | addPrefix ( $name) |
| | Add an interwiki prefix to the username regardless of circumstances.
|
| |
| | applyPrefix ( $name) |
| | Add an interwiki prefix to the username, if appropriate.
|
| |
|
| static | getLocal ( $username) |
| | Get local part of the user name.
|
| |
| static | getUserLinkTitle ( $userName) |
| | Get a target Title to link a username.
|
| |
| static | isExternal ( $username) |
| | Tells whether the username is external or not.
|
| |
Class to parse and build external user names.
- Since
- 1.31
Definition at line 29 of file ExternalUserNames.php.
◆ __construct()
| ExternalUserNames::__construct |
( |
|
$usernamePrefix, |
|
|
|
$assignKnownUsers |
|
) |
| |
- Parameters
-
| string | $usernamePrefix | Prefix to apply to unknown (and possibly also known) usernames |
| bool | $assignKnownUsers | Whether to apply the prefix to usernames that exist locally |
Definition at line 50 of file ExternalUserNames.php.
◆ addPrefix()
| ExternalUserNames::addPrefix |
( |
|
$name | ) |
|
Add an interwiki prefix to the username regardless of circumstances.
- Parameters
-
- Returns
- string Prefixed username, using ">" as separator
Definition at line 127 of file ExternalUserNames.php.
Referenced by applyPrefix().
◆ applyPrefix()
| ExternalUserNames::applyPrefix |
( |
|
$name | ) |
|
◆ getLocal()
| static ExternalUserNames::getLocal |
( |
|
$username | ) |
|
|
static |
Get local part of the user name.
- Parameters
-
| string | $username | Username to get |
- Returns
- string
Definition at line 147 of file ExternalUserNames.php.
◆ getUserLinkTitle()
| static ExternalUserNames::getUserLinkTitle |
( |
|
$userName | ) |
|
|
static |
◆ isExternal()
| static ExternalUserNames::isExternal |
( |
|
$username | ) |
|
|
static |
Tells whether the username is external or not.
- Parameters
-
| string | $username | Username to check |
- Returns
- bool true if it's external, false otherwise.
Definition at line 137 of file ExternalUserNames.php.
◆ $assignKnownUsers
| bool ExternalUserNames::$assignKnownUsers = false |
|
private |
◆ $triedCreations
| bool [] ExternalUserNames::$triedCreations = [] |
|
private |
◆ $usernamePrefix
| string ExternalUserNames::$usernamePrefix = 'imported' |
|
private |
The documentation for this class was generated from the following file: