|
MediaWiki master
|
Value object representing a user's identity. More...
Inherits Stringable, and MediaWiki\User\UserIdentity.

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. | |
Additional Inherited Members | |
Public Attributes inherited from MediaWiki\DAO\WikiAwareEntity | |
| const | LOCAL = false |
| Wiki ID value to use with instances that are defined relative to the local wiki. | |
Value object representing a user's identity.
Definition at line 20 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 45 of file UserIdentityValue.php.
| MediaWiki\User\UserIdentityValue::__toString | ( | ) |
Definition at line 160 of file UserIdentityValue.php.
| MediaWiki\User\UserIdentityValue::equals | ( | ?UserIdentity | $user | ) |
| UserIdentity | null | $user |
Implements MediaWiki\User\UserIdentity.
Definition at line 141 of file UserIdentityValue.php.
| MediaWiki\User\UserIdentityValue::getActorId | ( | $wikiId = self::LOCAL | ) |
| string | false | $wikiId |
Definition at line 130 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 111 of file UserIdentityValue.php.
| MediaWiki\User\UserIdentityValue::getName | ( | ) |
Implements MediaWiki\User\UserIdentity.
Definition at line 119 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 101 of file UserIdentityValue.php.
| MediaWiki\User\UserIdentityValue::isRegistered | ( | ) |
Implements MediaWiki\User\UserIdentity.
Definition at line 156 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 61 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 88 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 74 of file UserIdentityValue.php.