Meilisearch PHP | Documentation

Batch
in package
implements ArrayAccess

FinalYes
Tags
phpstan-import-type

RawBatchStats from BatchStats

RawBatchProgress from BatchProgress

phpstan-type

RawBatch array{ uid: non-negative-int, details: array, stats: RawBatchStats, duration: non-empty-string|null, startedAt: non-empty-string, finishedAt: non-empty-string|null, progress: RawBatchProgress|null, batchStrategy?: non-empty-string|null }

Table of Contents

Interfaces

ArrayAccess

Properties

$batchStrategy  : string|null
$details  : TaskDetails
$duration  : string|null
$finishedAt  : DateTimeImmutable|null
$progress  : BatchProgress|null
$raw  : array<string|int, mixed>
$startedAt  : DateTimeImmutable
$stats  : BatchStats
$uid  : int

Methods

__construct()  : mixed
fromArray()  : self
getBatchStrategy()  : non-empty-string|null
Free-form reason why the batch stopped accepting tasks (not a closed enum).
getDetails()  : TaskDetails
getDuration()  : non-empty-string|null
getFinishedAt()  : DateTimeImmutable|null
getProgress()  : BatchProgress|null
Real-time progress while the batch is processing; null when finished.
getStartedAt()  : DateTimeImmutable
getStats()  : BatchStats
getUid()  : int
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
toArray()  : RawBatch

Properties

$batchStrategy read-only

private string|null $batchStrategy

$duration read-only

private string|null $duration

$finishedAt read-only

private DateTimeImmutable|null $finishedAt

$raw read-only

private array<string|int, mixed> $raw

$startedAt read-only

private DateTimeImmutable $startedAt

$uid read-only

private int $uid

Methods

__construct()

public __construct(int $uid, TaskDetails $details, BatchStats $stats, non-empty-string|null $duration, DateTimeImmutable $startedAt, DateTimeImmutable|null $finishedAt, BatchProgress|null $progress, non-empty-string|null $batchStrategy, RawBatch $raw) : mixed
Parameters
$uid : int
$details : TaskDetails
$stats : BatchStats
$duration : non-empty-string|null
$startedAt : DateTimeImmutable
$finishedAt : DateTimeImmutable|null
$progress : BatchProgress|null
$batchStrategy : non-empty-string|null
$raw : RawBatch

fromArray()

public static fromArray(RawBatch $data) : self
Parameters
$data : RawBatch
Return values
self

getBatchStrategy()

Free-form reason why the batch stopped accepting tasks (not a closed enum).

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

getDuration()

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

getFinishedAt()

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

getProgress()

Real-time progress while the batch is processing; null when finished.

public getProgress() : BatchProgress|null

When present, percentage is documented by Meilisearch as 0.0–100.0.

Return values
BatchProgress|null

getStartedAt()

public getStartedAt() : DateTimeImmutable
Return values
DateTimeImmutable

getUid()

public getUid() : int
Return values
int

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

toArray()

public toArray() : RawBatch
Return values
RawBatch
On this page

Search results