Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Batch / BatchStorageInterface.php
1 <?php
2
3 namespace Drupal\Core\Batch;
4
5 /**
6  * Defines a common interface for batch storage operations.
7  */
8 interface BatchStorageInterface {
9
10   /**
11    * Loads a batch.
12    *
13    * @param int $id
14    *   The ID of the batch to load.
15    *
16    * @return array
17    *   An array representing the batch, or FALSE if no batch was found.
18    */
19   public function load($id);
20
21   /**
22    * Creates and saves a batch.
23    *
24    * @param array $batch
25    *   The array representing the batch to create.
26    */
27   public function create(array $batch);
28
29   /**
30    * Updates a batch.
31    *
32    * @param array $batch
33    *   The array representing the batch to update.
34    */
35   public function update(array $batch);
36
37   /**
38    * Deletes a batch.
39    *
40    * @param int $id
41    *   The ID of the batch to delete.
42    */
43   public function delete($id);
44
45   /**
46    * Cleans up failed or old batches.
47    */
48   public function cleanup();
49
50 }