You are here

interface SourceInterface in Backup and Migrate 5.0.x

Provides an interface defining a backup source.

Hierarchy

Expanded class hierarchy of SourceInterface

All classes that implement SourceInterface

1 file declares its use of SourceInterface
DrupalSiteArchiveSource.php in src/Drupal/Source/DrupalSiteArchiveSource.php

File

src/Core/Source/SourceInterface.php, line 11

Namespace

Drupal\backup_migrate\Core\Source
View source
interface SourceInterface extends PluginInterface {

  /**
   * Export this source to the given temp file.
   *
   * This should be the main back up function for this source.
   *
   * @return \Drupal\backup_migrate\Core\File\BackupFileReadableInterface
   *   A backup file with the contents of the source dumped to it..
   */
  public function exportToFile();

  /**
   * Import to this source from the given backup file.
   *
   * This is the main restore function for this source.
   *
   * @param \Drupal\backup_migrate\Core\File\BackupFileReadableInterface $file
   *   The file to read the backup from. It will not be opened for reading.
   */
  public function importFromFile(BackupFileReadableInterface $file);

}

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
SourceInterface::exportToFile public function Export this source to the given temp file. 2
SourceInterface::importFromFile public function Import to this source from the given backup file. 2