Copied!

Token

Token.php : 14
Extends ValueObject

The base class for all value objects and structs.

Supports readonly properties by marking them as protected. In this case they will only be writable using constructor, and need to be documented using property-read <$var> annotation in class doc in addition to inline property doc. Writable properties must be public and must be documented inline.

Constants

publicMAX_LENGTH

Token.php : 16
public mixed MAX_LENGTH = 255

Methods

public__construct()

Token.php : 32

Construct object optionally with a set of properties.

public __construct(int $id, string $type, string $token, string|null $identifier, DateTimeImmutable $created, DateTimeImmutable $expires, bool $revoked)

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

Name Type Default value Description
$id int - -
$type string - -
$token string - -
$identifier string|null - -
$created DateTimeImmutable - -
$expires DateTimeImmutable - -
$revoked bool - -

public__toString()

Token.php : 87
public __toString() : string

Return values

string

publicgetCreated()

Token.php : 72
public getCreated() : DateTimeImmutable

Return values

DateTimeImmutable

publicgetExpires()

Token.php : 77
public getExpires() : DateTimeImmutable

Return values

DateTimeImmutable

publicgetId()

Token.php : 52
public getId() : int

Return values

int

publicgetIdentifier()

Token.php : 67
public getIdentifier() : string|null

Return values

string|null

publicgetToken()

Token.php : 62
public getToken() : string

Return values

string

publicgetType()

Token.php : 57
public getType() : string

Return values

string

publicisRevoked()

Token.php : 82
public isRevoked() : bool

Return values

bool

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>