You are here

interface ReadableDestinationInterface in Backup and Migrate 5.0.x

Interface ReadableDestinationInterface.

@package Drupal\backup_migrate\Core\Destination

Hierarchy

Expanded class hierarchy of ReadableDestinationInterface

All classes that implement ReadableDestinationInterface

1 file declares its use of ReadableDestinationInterface
DrupalBrowserUploadDestination.php in src/Drupal/Destination/DrupalBrowserUploadDestination.php

File

src/Core/Destination/ReadableDestinationInterface.php, line 12

Namespace

Drupal\backup_migrate\Core\Destination
View source
interface ReadableDestinationInterface extends DestinationInterface {

  /**
   * Get a file object representing the file with the given ID from the dest.
   *
   * This file item will not necessarily be readable nor will it have extended
   * metadata loaded. Use loadForReading and loadFileMetadata to get those.
   *
   * @todo Decide if extended metadata should ALWAYS be loaded here.
   *
   * @param string $id
   *   The unique identifier for the file. Usually the filename.
   *
   * @return \Drupal\backup_migrate\Core\File\BackupFileInterface
   *   The file if it exists or NULL if it doesn't
   */
  public function getFile($id);

  /**
   * Load the metadata for the given file however it may be stored.
   *
   * @param \Drupal\backup_migrate\Core\File\BackupFileInterface $file
   *
   * @return \Drupal\backup_migrate\Core\File\BackupFileInterface
   */
  public function loadFileMetadata(BackupFileInterface $file);

  /**
   * Load the file with the given ID from the destination.
   *
   * @param \Drupal\backup_migrate\Core\File\BackupFileInterface $file
   *
   * @return \Drupal\backup_migrate\Core\File\BackupFileReadableInterface
   *   The file if it exists or NULL if it doesn't.
   */
  public function loadFileForReading(BackupFileInterface $file);

  /**
   * Does the file with the given id (filename) exist in this destination.
   *
   * @param string $id
   *   The id (usually the filename) of the file.
   *
   * @return bool
   *   Whether the file exists in this destination.
   */
  public function fileExists($id);

}

Members

Namesort descending Modifiers Type Description Overrides
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
ReadableDestinationInterface::fileExists public function Does the file with the given id (filename) exist in this destination. 2
ReadableDestinationInterface::getFile public function Get a file object representing the file with the given ID from the dest. 2
ReadableDestinationInterface::loadFileForReading public function Load the file with the given ID from the destination. 2
ReadableDestinationInterface::loadFileMetadata public function Load the metadata for the given file however it may be stored. 2