Uuid
Table of Contents
Methods
- __construct() : mixed
- add() : bool
- Method is trying to add a new UUID to the DB via INSERT IGNORE query.
- cleanOldRecords() : string
- Agent. Deletes old records (older than 30 days) from the table.
- delete() : bool
- Deletes UUID record from the DB table.
- getMessageId() : int|null
- Returns message ID.
- updateIfExpired() : bool
- Updates UUID record with current date and time, if it is expired.
- updateMessageId() : void
- Updates message_id for the certain UUID.
- validate() : bool
- Validates UUIDv4 string.
Methods
__construct()
public
__construct(string $uuid) : mixed
Parameters
- $uuid : string
-
UUID value.
add()
Method is trying to add a new UUID to the DB via INSERT IGNORE query.
public
add() : bool
If there is already a record with the same UUID, then we will get false.
Return values
boolcleanOldRecords()
Agent. Deletes old records (older than 30 days) from the table.
public
static cleanOldRecords() : string
Return values
stringdelete()
Deletes UUID record from the DB table.
public
delete() : bool
Return values
boolgetMessageId()
Returns message ID.
public
getMessageId() : int|null
Return values
int|nullupdateIfExpired()
Updates UUID record with current date and time, if it is expired.
public
updateIfExpired() : bool
Return values
boolupdateMessageId()
Updates message_id for the certain UUID.
public
updateMessageId(int $messageId) : void
Parameters
- $messageId : int
-
Message id.
validate()
Validates UUIDv4 string.
public
static validate(string $uuid) : bool
Parameters
- $uuid : string