You are here

interface ListableDestinationInterface in Backup and Migrate 8.4

Interface ListableDestinationInterface.

@package BackupMigrate\Core\Destination

Hierarchy

Expanded class hierarchy of ListableDestinationInterface

All classes that implement ListableDestinationInterface

2 files declare their use of ListableDestinationInterface
BackupController.php in src/Controller/BackupController.php
Schedule.php in src/Entity/Schedule.php

File

lib/backup_migrate_core/src/Destination/ListableDestinationInterface.php, line 12

Namespace

BackupMigrate\Core\Destination
View source
interface ListableDestinationInterface extends DestinationInterface {

  /**
   * Return a list of files from the destination. This list should be
   * date ordered from newest to oldest.
   *
   * @todo Decide if extended metadata should ALWAYS be loaded here. Is there
   * a use case for getting a list of files WITHOUT metadata?
   *
   * @return BackupFileInterface[]
   *   An array of BackupFileInterface objects representing the files with
   *   the file ids as keys. The file ids are usually file names but that
   *   is up to the implementing destination to decide. The returned files
   *   may not be readable. Use loadFileForReading to get a readable file.
   */
  public function listFiles();

  /**
   * Run a basic query with sort on the list of files.
   *
   * @param array $filters An array of of metadata fields to filter by.
   * @param string $sort A metadata field to sort bby
   * @param int $sort_direction The direction to sort by. SORT_ASC or SORT_DESC
   * @param int $count
   * @param int $start
   *
   * @return mixed
   */
  public function queryFiles($filters = [], $sort = NULL, $sort_direction = NULL, $count = 100, $start = 0);

  /**
   * @return int The number of files in the destination.
   */
  public function countFiles();

  /**
   * @return boolean Whether the file exists in this destination
   */
  public function fileExists($id);

  /**
   * Delete the specified file.
   */
  public function deleteFile($id);

}

Members

Namesort descending Modifiers Type Description Overrides
ListableDestinationInterface::countFiles public function 1
ListableDestinationInterface::deleteFile public function Delete the specified file.
ListableDestinationInterface::fileExists public function
ListableDestinationInterface::listFiles public function Return a list of files from the destination. This list should be date ordered from newest to oldest. 1
ListableDestinationInterface::queryFiles public function Run a basic query with sort on the list of files. 1
PluginInterface::opWeight public function What is the weight of the given operation for this plugin. 1
PluginInterface::supportedOps public function Get a list of supported operations and their weight. 1
PluginInterface::supportsOp public function Does this plugin implement the given operation. 1