UserRefreshToken
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait
AbstractYes
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'userRefreshToken'
Table of Contents
Interfaces
- IdentifiableInterface
- Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).
Properties
- $expiresAt : DateTime|null
- $id : int|null
- $ip : string|null
- $issuedAt : DateTime|null
- $parentId : int|null
- $revokedAt : DateTime|null
- $revokedReason : string|null
- $tokenHash : string
- $userAgent : string|null
- $userId : int
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getExpiresAt() : DateTime|null
- getId() : int|null
- getIp() : string|null
- getIssuedAt() : DateTime|null
- getParentId() : int|null
- getRevokedAt() : DateTime|null
- getRevokedReason() : string|null
- getTokenHash() : string
- getUserAgent() : string|null
- getUserId() : int
- isExpired() : bool
- isPersisted() : bool
- isRevoked() : bool
- isUsable() : bool
- setExpiresAt() : $this
- setId() : $this
- setIp() : $this
- setIssuedAt() : $this
- setParentId() : $this
- setRevokedAt() : $this
- setRevokedReason() : $this
- setTokenHash() : $this
- setUserAgent() : $this
- setUserId() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$expiresAt
protected
DateTime|null
$expiresAt
= null
Attributes
- #[Column]
- $name: 'expires_at'
- $type: 'datetime'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: 'integer'
- $name: 'user_refresh_token_id'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$ip
protected
string|null
$ip
= null
Attributes
- #[Column]
- $name: 'ip'
- $type: 'string'
- $length: 45
- $nullable: true
- #[PersonalData]
- PersonalDataKind::Hidden
$issuedAt
protected
DateTime|null
$issuedAt
= null
Attributes
- #[Column]
- $name: 'issued_at'
- $type: 'datetime'
$parentId
protected
int|null
$parentId
= null
Attributes
- #[Column]
- $name: 'parent_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$revokedAt
protected
DateTime|null
$revokedAt
= null
Attributes
- #[Column]
- $name: 'revoked_at'
- $type: 'datetime'
- $nullable: true
$revokedReason
protected
string|null
$revokedReason
= null
Attributes
- #[Column]
- $name: 'revoked_reason'
- $type: 'string'
- $length: 30
- $nullable: true
$tokenHash
protected
string
$tokenHash
= ''
Attributes
- #[Column]
- $name: 'token_hash'
- $type: 'string'
- $length: 64
- $unique: true
- #[FieldAccess]
- $read: Audience::Internal
- $insert: Audience::All
- $update: Audience::All
$userAgent
protected
string|null
$userAgent
= null
Attributes
- #[Column]
- $name: 'user_agent'
- $type: 'string'
- $length: 255
- $nullable: true
$userId
protected
int
$userId
= 0
Attributes
- #[Column]
- $name: 'cms_system_users_user_id'
- $type: 'integer'
- $options: ['unsigned' => true]
Methods
__construct()
public
__construct([int|null $id = null ][, int $userId = 0 ][, string $tokenHash = '' ][, int|null $parentId = null ][, DateTime|null $issuedAt = null ][, DateTime|null $expiresAt = null ][, DateTime|null $revokedAt = null ][, string|null $revokedReason = null ][, string|null $userAgent = null ][, string|null $ip = null ]) : mixed
Parameters
- $id : int|null = null
- $userId : int = 0
- $tokenHash : string = ''
- $parentId : int|null = null
- $issuedAt : DateTime|null = null
- $expiresAt : DateTime|null = null
- $revokedAt : DateTime|null = null
- $revokedReason : string|null = null
- $userAgent : string|null = null
- $ip : string|null = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getExpiresAt()
public
getExpiresAt() : DateTime|null
Return values
DateTime|nullgetId()
public
getId() : int|null
Return values
int|nullgetIp()
public
getIp() : string|null
Return values
string|nullgetIssuedAt()
public
getIssuedAt() : DateTime|null
Return values
DateTime|nullgetParentId()
public
getParentId() : int|null
Return values
int|nullgetRevokedAt()
public
getRevokedAt() : DateTime|null
Return values
DateTime|nullgetRevokedReason()
public
getRevokedReason() : string|null
Return values
string|nullgetTokenHash()
public
getTokenHash() : string
Return values
stringgetUserAgent()
public
getUserAgent() : string|null
Return values
string|nullgetUserId()
public
getUserId() : int
Return values
intisExpired()
public
isExpired([DateTime|null $now = null ]) : bool
Parameters
- $now : DateTime|null = null
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisRevoked()
public
isRevoked() : bool
Return values
boolisUsable()
public
isUsable([DateTime|null $now = null ]) : bool
Parameters
- $now : DateTime|null = null
Return values
boolsetExpiresAt()
public
setExpiresAt(DateTime|null $expiresAt) : $this
Parameters
- $expiresAt : DateTime|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetIp()
public
setIp(string|null $ip) : $this
Parameters
- $ip : string|null
Return values
$thissetIssuedAt()
public
setIssuedAt(DateTime|null $issuedAt) : $this
Parameters
- $issuedAt : DateTime|null
Return values
$thissetParentId()
public
setParentId(int|null $parentId) : $this
Parameters
- $parentId : int|null
Return values
$thissetRevokedAt()
public
setRevokedAt(DateTime|null $revokedAt) : $this
Parameters
- $revokedAt : DateTime|null
Return values
$thissetRevokedReason()
public
setRevokedReason(string|null $revokedReason) : $this
Parameters
- $revokedReason : string|null
Return values
$thissetTokenHash()
public
setTokenHash(string $tokenHash) : $this
Parameters
- $tokenHash : string
Return values
$thissetUserAgent()
public
setUserAgent(string|null $userAgent) : $this
Parameters
- $userAgent : string|null
Return values
$thissetUserId()
public
setUserId(int $userId) : $this
Parameters
- $userId : int
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>