# wp-stateless/trunk/lib/classes/batch/interface-batch.php

WP-Stateless – Google Cloud Storage, version trunk. 42 lines.

- Page: https://pluginprobe.com/plugins/wp-stateless/trunk/code/lib/classes/batch/interface-batch.php
- Raw: https://pluginprobe.com/plugins/wp-stateless/trunk/raw/lib/classes/batch/interface-batch.php
- Modified: 2024-04-04T16:29:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-stateless/trunk/code/lib/classes/batch/interface-batch.php#L10-L20`.

```php
<?php
/**
 * Batch Task Interface
 *
 * @since 4.0.0
 */

namespace wpCloud\StatelessMedia\Batch;

interface IBatchTask {

  /**
   * Initialize the state of the task
   */
  public function init_state();

  /**
   * Get human-friendly description
   */
  public function get_description();

  /**
   * Get the current state of the task
   */
  public function get_state();
  
  /**
   * Set/restore the current state of the task
   */
  public function set_state($state);

  /**
   * Get the next batch of items to process
   */
  public function get_batch();

  /**
   * Process the item
   */
  public function process_item($item);
}

```
