interface BackupFileInterface in Backup and Migrate 8.4
Provides a metadata-only file object.
If the file needs to be readable or writable use \BackupMigrate\Core\File\BackupFileReadableInterface or \BackupMigrate\Core\File\BackupFileWritableInterface.
Hierarchy
- interface \BackupMigrate\Core\File\BackupFileInterface
Expanded class hierarchy of BackupFileInterface
All classes that implement BackupFileInterface
9 files declare their use of BackupFileInterface
- BackupFile.php in lib/
backup_migrate_core/ src/ File/ BackupFile.php - DestinationBase.php in lib/
backup_migrate_core/ src/ Destination/ DestinationBase.php - DirectoryDestination.php in lib/
backup_migrate_core/ src/ Destination/ DirectoryDestination.php - DrupalBrowserUploadDestination.php in src/
Destination/ DrupalBrowserUploadDestination.php - ListableDestinationInterface.php in lib/
backup_migrate_core/ src/ Destination/ ListableDestinationInterface.php
File
- lib/
backup_migrate_core/ src/ File/ BackupFileInterface.php, line 12
Namespace
BackupMigrate\Core\FileView source
interface BackupFileInterface {
/**
* Get a metadata value.
*
* @param string $key The key for the metadata item.
*
* @return mixed The value of the metadata for this file.
*/
public function getMeta($key);
/**
* Set a metadata value.
*
* @param string $key The key for the metadata item.
* @param mixed $value The value for the metadata item.
*/
public function setMeta($key, $value);
/**
* Set a metadata value.
*
* @param array $values An array of key-value pairs for the file metadata.
*/
public function setMetaMultiple($values);
/**
* Get all meta data as an array.
*
* @return array $values An array of key-value pairs for the file metadata.
*/
public function getMetaAll();
/**
* Set the file name without extension.
*
* @param string $name
*/
public function setName($name);
/**
* Get the file name without extension.
*
* @return string
*/
public function getName();
/**
* Get the full filename with extensions.
*
* @return string
* The full filename (with extension, without filepath)
*/
public function getFullName();
/**
* Set the full filename with extensions.
*
* @param string $fullname
* The full filename (with extension, without filepath)
*/
public function setFullName($fullname);
/**
* Get an array of file extensions.
*
* For example: testfile.txt.gz would return: ['txt', 'gz']
*
* @return array
*/
public function getExtList();
/**
* Get the last file extension.
*
* For example: testfile.txt.gz would return: 'gz'
*
* @return mixed
*/
public function getExtLast();
/**
* Get the full file extension.
*
* For example: testfile.txt.gz would return: 'txt.gz'
*
* @return mixed
*/
public function getExt();
/**
* Set the extension array for the file to the given array.
*
* @param array $ext
* The list of file extensions for the file
*/
public function setExtList($ext);
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BackupFileInterface:: |
public | function | Get the full file extension. | 1 |
BackupFileInterface:: |
public | function | Get the last file extension. | 1 |
BackupFileInterface:: |
public | function | Get an array of file extensions. | 1 |
BackupFileInterface:: |
public | function | Get the full filename with extensions. | 1 |
BackupFileInterface:: |
public | function | Get a metadata value. | 1 |
BackupFileInterface:: |
public | function | Get all meta data as an array. | 1 |
BackupFileInterface:: |
public | function | Get the file name without extension. | 1 |
BackupFileInterface:: |
public | function | Set the extension array for the file to the given array. | 1 |
BackupFileInterface:: |
public | function | Set the full filename with extensions. | 1 |
BackupFileInterface:: |
public | function | Set a metadata value. | 2 |
BackupFileInterface:: |
public | function | Set a metadata value. | 2 |
BackupFileInterface:: |
public | function | Set the file name without extension. | 1 |