Meilisearch PHP | Documentation

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

$duration read-only

private string|null $duration = null

$enqueuedAt read-only

private DateTimeImmutable $enqueuedAt

$finishedAt read-only

private DateTimeImmutable|null $finishedAt = null

$indexUid read-only

private string|null $indexUid

$startedAt read-only

private DateTimeImmutable|null $startedAt = null

$taskUid read-only

private int $taskUid

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
Task

getBatchUid()

public getBatchUid() : int|null
Return values
int|null

getCanceledBy()

public getCanceledBy() : int|null
Return values
int|null

getDuration()

public getDuration() : non-empty-string|null
Return values
non-empty-string|null

getEnqueuedAt()

public getEnqueuedAt() : DateTimeImmutable
Return values
DateTimeImmutable

getFinishedAt()

public getFinishedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getIndexUid()

public getIndexUid() : non-empty-string|null
Return values
non-empty-string|null

getStartedAt()

public getStartedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getTaskUid()

public getTaskUid() : int
Return values
int

isFinished()

public isFinished() : bool
Return values
bool

wait()

public wait([int $timeoutInMs = 5000 ][, int $intervalInMs = 50 ]) : Task
Parameters
$timeoutInMs : int = 5000
$intervalInMs : int = 50
Return values
Task

        
On this page

Search results