AuthenticatedUser
extends SettingsContainerAbstract
in package
FinalYes
A simple read-only container for user data responses
Tags
Table of Contents
Properties
- $avatar : string|null
- $data : array<string, mixed>
- $displayName : string|null
- $email : string|null
- $handle : string|null
- $id : string|int|null
- $url : string|null
- $avatar : string|null
- (magic) An avatar URL
- $data : array<string, mixed>
- (magic) The full user endpoint response
- $displayName : string|null
- (magic) The user's display name
- $email : string|null
- (magic) The (main) email address
- $handle : string|null
- (magic) The user handle, account or tag name
- $id : string|int|null
- (magic) A user ID, may be string or integer
- $url : string|null
- (magic) URL to the user profile
Methods
- __construct() : mixed
- __set() : void
- fromIterable() : static
- fromJSON() : static
- set_displayName() : void
- trim and set the display name
- set_id() : void
- set the user id, convert to int if possible
Properties
$avatar
public
string|null
$avatar
$data
public
array<string, mixed>
$data
$displayName
public
string|null
$displayName
public
string|null
$email
$handle
public
string|null
$handle
$id
public
string|int|null
$id
$url
public
string|null
$url
$avatar
(magic) An avatar URL
protected
string|null
$avatar
= null
$data
(magic) The full user endpoint response
protected
array<string, mixed>
$data
= []
$displayName
(magic) The user's display name
protected
string|null
$displayName
= null
(magic) The (main) email address
protected
string|null
$email
= null
$handle
(magic) The user handle, account or tag name
protected
string|null
$handle
= null
$id
(magic) A user ID, may be string or integer
protected
string|int|null
$id
= null
$url
(magic) URL to the user profile
protected
string|null
$url
= null
Methods
__construct()
public
__construct([iterable<string|int, mixed>|null $properties = null ]) : mixed
Parameters
- $properties : iterable<string|int, mixed>|null = null
Tags
__set()
public
__set(string $property, mixed $value) : void
Parameters
- $property : string
- $value : mixed
Tags
fromIterable()
public
fromIterable(iterable<string|int, mixed> $properties) : static
Parameters
- $properties : iterable<string|int, mixed>
Tags
Return values
staticfromJSON()
public
fromJSON(string $json) : static
Parameters
- $json : string
Tags
Return values
staticset_displayName()
trim and set the display name
protected
set_displayName(string|null $displayName) : void
Parameters
- $displayName : string|null
set_id()
set the user id, convert to int if possible
protected
set_id(string|int|null $id) : void
Parameters
- $id : string|int|null