interface BatchStorageInterface (View source)

Defines a common interface for batch storage operations.

Methods

array
load(int $id)

Loads a batch.

create(array $batch)

Creates and saves a batch.

update(array $batch)

Updates a batch.

delete(int $id)

Deletes a batch.

cleanup()

Cleans up failed or old batches.

Details

array load(int $id)

Loads a batch.

Parameters

int $id

The ID of the batch to load.

Return Value

array

An array representing the batch, or FALSE if no batch was found.

create(array $batch)

Creates and saves a batch.

Parameters

array $batch

The array representing the batch to create.

update(array $batch)

Updates a batch.

Parameters

array $batch

The array representing the batch to update.

delete(int $id)

Deletes a batch.

Parameters

int $id

The ID of the batch to delete.

cleanup()

Cleans up failed or old batches.