Documentation

AuthenticatedUser extends SettingsContainerAbstract
in package

FinalYes

A simple read-only container for user data responses

Tags
see
UserInfo::me()

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

$data

(magic) The full user endpoint response

protected array<string, mixed> $data = []

$displayName

(magic) The user's display name

protected string|null $displayName = 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

Methods

__construct()

public __construct([iterable<string|int, mixed>|null $properties = null ]) : mixed
Parameters
$properties : iterable<string|int, mixed>|null = null
Tags
noinspection

PhpMissingParentConstructorInspection

__set()

public __set(string $property, mixed $value) : void
Parameters
$property : string
$value : mixed
Tags
codeCoverageIgnore

fromIterable()

public fromIterable(iterable<string|int, mixed> $properties) : static
Parameters
$properties : iterable<string|int, mixed>
Tags
codeCoverageIgnore
Return values
static

fromJSON()

public fromJSON(string $json) : static
Parameters
$json : string
Tags
codeCoverageIgnore
Return values
static

set_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

        
On this page

Search results