MediaWiki REL1_37
|
Value object representing a user's identity. More...
Public Member Functions | |
__construct (int $id, string $name, $wikiId=self::LOCAL) | |
__toString () | |
equals (?UserIdentity $user) | |
getActorId ( $wikiId=self::LOCAL) | |
getId ( $wikiId=self::LOCAL) | |
The numerical user ID provided to the constructor. | |
getName () | |
getWikiId () | |
Get the ID of the wiki this UserIdentity belongs to. | |
isRegistered () | |
Public Member Functions inherited from MediaWiki\DAO\WikiAwareEntity | |
assertWiki ( $wikiId) | |
Throws if $wikiId is different from the return value of getWikiId(). | |
Static Public Member Functions | |
static | newAnonymous (string $name, $wikiId=self::LOCAL) |
Create UserIdentity for an anonymous user. | |
static | newExternal (string $prefix, string $name, $wikiId=self::LOCAL) |
Create UserIdentity for an external user with $prefix and $name. | |
static | newRegistered (int $userId, string $name, $wikiId=self::LOCAL) |
Create UserIdentity for a registered user. | |
Private Attributes | |
int | $id |
string | $name |
bool string | $wikiId |
Value object representing a user's identity.
@newable
Definition at line 35 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::__construct | ( | int | $id, |
string | $name, | ||
$wikiId = self::LOCAL |
|||
) |
int | $id | user ID |
string | $name | user name |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 61 of file UserIdentityValue.php.
References $args, MediaWiki\User\UserIdentityValue\$id, MediaWiki\User\UserIdentityValue\$name, MediaWiki\User\UserIdentityValue\$wikiId, and wfDeprecatedMsg().
MediaWiki\User\UserIdentityValue::__toString | ( | ) |
Definition at line 192 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::equals | ( | ?UserIdentity | $user | ) |
UserIdentity | null | $user |
Implements MediaWiki\User\UserIdentity.
Definition at line 173 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getActorId | ( | $wikiId = self::LOCAL | ) |
string | false | $wikiId |
Definition at line 162 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getId | ( | $wikiId = self::LOCAL | ) |
The numerical user ID provided to the constructor.
string | false | $wikiId | The wiki ID expected by the caller |
Implements MediaWiki\User\UserIdentity.
Definition at line 143 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getName | ( | ) |
Implements MediaWiki\User\UserIdentity.
Definition at line 151 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getWikiId | ( | ) |
Get the ID of the wiki this UserIdentity belongs to.
Implements MediaWiki\DAO\WikiAwareEntity.
Definition at line 132 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::isRegistered | ( | ) |
Implements MediaWiki\User\UserIdentity.
Definition at line 188 of file UserIdentityValue.php.
|
static |
Create UserIdentity for an anonymous user.
string | $name | |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 92 of file UserIdentityValue.php.
|
static |
Create UserIdentity for an external user with $prefix and $name.
string | $prefix | |
string | $name | |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 119 of file UserIdentityValue.php.
|
static |
Create UserIdentity for a registered user.
int | $userId | |
string | $name | |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 105 of file UserIdentityValue.php.
|
private |
Definition at line 41 of file UserIdentityValue.php.
Referenced by MediaWiki\User\UserIdentityValue\__construct().
|
private |
Definition at line 46 of file UserIdentityValue.php.
Referenced by MediaWiki\User\UserIdentityValue\__construct().
|
private |
Definition at line 49 of file UserIdentityValue.php.
Referenced by MediaWiki\User\UserIdentityValue\__construct().