Task
in package
FinalYes
Table of Contents
Properties
- $await : Closure|null
- $batchUid : int|null
- $canceledBy : int|null
- $details : TaskDetails|null
- $duration : string|null
- $enqueuedAt : DateTimeImmutable
- $error : TaskError|null
- $finishedAt : DateTimeImmutable|null
- $indexUid : string|null
- $startedAt : DateTimeImmutable|null
- $status : TaskStatus
- $taskUid : int
- $type : TaskType
Methods
- __construct() : mixed
- fromArray() : Task
- getBatchUid() : int|null
- getCanceledBy() : int|null
- getDetails() : TaskDetails|null
- getDuration() : non-empty-string|null
- getEnqueuedAt() : DateTimeImmutable
- getError() : TaskError|null
- getFinishedAt() : DateTimeImmutable|null
- getIndexUid() : non-empty-string|null
- getStartedAt() : DateTimeImmutable|null
- getStatus() : TaskStatus
- getTaskUid() : int
- getType() : TaskType
- isFinished() : bool
- wait() : Task
Properties
$await read-only
private
Closure|null
$await
= null
$batchUid read-only
private
int|null
$batchUid
= null
$canceledBy read-only
private
int|null
$canceledBy
= null
$details read-only
private
TaskDetails|null
$details
= null
$duration read-only
private
string|null
$duration
= null
$enqueuedAt read-only
private
DateTimeImmutable
$enqueuedAt
$error read-only
private
TaskError|null
$error
= null
$finishedAt read-only
private
DateTimeImmutable|null
$finishedAt
= null
$indexUid read-only
private
string|null
$indexUid
$startedAt read-only
private
DateTimeImmutable|null
$startedAt
= null
$status read-only
private
TaskStatus
$status
$taskUid read-only
private
int
$taskUid
$type read-only
private
TaskType
$type
Methods
__construct()
public
__construct(int $taskUid, non-empty-string|null $indexUid, TaskStatus $status, TaskType $type, DateTimeImmutable $enqueuedAt[, DateTimeImmutable|null $startedAt = null ][, DateTimeImmutable|null $finishedAt = null ][, non-empty-string|null $duration = null ][, int|null $canceledBy = null ][, int|null $batchUid = null ][, TaskDetails|null $details = null ][, TaskError|null $error = null ][, callable(int, int, int): Task|null $await = null ]) : mixed
Parameters
- $taskUid : int
- $indexUid : non-empty-string|null
- $status : TaskStatus
- $type : TaskType
- $enqueuedAt : DateTimeImmutable
- $startedAt : DateTimeImmutable|null = null
- $finishedAt : DateTimeImmutable|null = null
- $duration : non-empty-string|null = null
- $canceledBy : int|null = null
- $batchUid : int|null = null
- $details : TaskDetails|null = null
- $error : TaskError|null = null
- $await : callable(int, int, int): Task|null = null
fromArray()
public
static fromArray(array{taskUid?: int, uid?: int, indexUid?: non-empty-string, status: non-empty-string, type: non-empty-string, enqueuedAt: non-empty-string, startedAt?: non-empty-string|null, finishedAt?: non-empty-string|null, duration?: non-empty-string|null, canceledBy?: int, batchUid?: int, details?: array|null, error?: array|null} $data[, callable(int, int, int): Task|null $await = null ]) : Task
Parameters
- $data : array{taskUid?: int, uid?: int, indexUid?: non-empty-string, status: non-empty-string, type: non-empty-string, enqueuedAt: non-empty-string, startedAt?: non-empty-string|null, finishedAt?: non-empty-string|null, duration?: non-empty-string|null, canceledBy?: int, batchUid?: int, details?: array|null, error?: array|null}
- $await : callable(int, int, int): Task|null = null
Return values
TaskgetBatchUid()
public
getBatchUid() : int|null
Return values
int|nullgetCanceledBy()
public
getCanceledBy() : int|null
Return values
int|nullgetDetails()
public
getDetails() : TaskDetails|null
Return values
TaskDetails|nullgetDuration()
public
getDuration() : non-empty-string|null
Return values
non-empty-string|nullgetEnqueuedAt()
public
getEnqueuedAt() : DateTimeImmutable
Return values
DateTimeImmutablegetError()
public
getError() : TaskError|null
Return values
TaskError|nullgetFinishedAt()
public
getFinishedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetIndexUid()
public
getIndexUid() : non-empty-string|null
Return values
non-empty-string|nullgetStartedAt()
public
getStartedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetStatus()
public
getStatus() : TaskStatus
Return values
TaskStatusgetTaskUid()
public
getTaskUid() : int
Return values
intgetType()
public
getType() : TaskType
Return values
TaskTypeisFinished()
public
isFinished() : bool
Return values
boolwait()
public
wait([int $timeoutInMs = 5000 ][, int $intervalInMs = 50 ]) : Task
Parameters
- $timeoutInMs : int = 5000
- $intervalInMs : int = 50