You are here

public function DestinationBase::loadFileMetadata in Backup and Migrate 8.4

Load the metadata for the given file however it may be stored.

Parameters

\BackupMigrate\Core\File\BackupFileInterface $file:

Return value

\BackupMigrate\Core\File\BackupFileInterface

Overrides ReadableDestinationInterface::loadFileMetadata

2 calls to DestinationBase::loadFileMetadata()
DirectoryDestination::queryFiles in lib/backup_migrate_core/src/Destination/DirectoryDestination.php
Run a basic query with sort on the list of files.
DrupalDirectoryDestination::queryFiles in src/Destination/DrupalDirectoryDestination.php
Run a basic query with sort on the list of files.

File

lib/backup_migrate_core/src/Destination/DestinationBase.php, line 37

Class

DestinationBase
Class DestinationBase.

Namespace

BackupMigrate\Core\Destination

Code

public function loadFileMetadata(BackupFileInterface $file) {

  // If this file is already loaded, simply return it.
  // @TODO: fix this inappropriate use of file metadata.
  if (!$file
    ->getMeta('metadata_loaded')) {
    $metadata = $this
      ->_loadFileMetadataArray($file);
    $file
      ->setMetaMultiple($metadata);
    $file
      ->setMeta('metadata_loaded', TRUE);
  }
  return $file;
}