interface BackupFileWritableInterface in Backup and Migrate 5.0.x
A service to provision temp files in the correct place for the environment.
Hierarchy
- interface \Drupal\backup_migrate\Core\File\BackupFileInterface
- interface \Drupal\backup_migrate\Core\File\BackupFileReadableInterface
- interface \Drupal\backup_migrate\Core\File\BackupFileWritableInterface
- interface \Drupal\backup_migrate\Core\File\BackupFileReadableInterface
Expanded class hierarchy of BackupFileWritableInterface
All classes that implement BackupFileWritableInterface
6 files declare their use of BackupFileWritableInterface
- ArchiveWriterInterface.php in src/
Core/ Service/ ArchiveWriterInterface.php - CompressionFilter.php in src/
Core/ Filter/ CompressionFilter.php - DrupalEncrypt.php in src/
Drupal/ Filter/ DrupalEncrypt.php - MetadataWriter.php in src/
Core/ Filter/ MetadataWriter.php - MySQLiSource.php in src/
Core/ Source/ MySQLiSource.php
File
- src/
Core/ File/ BackupFileWritableInterface.php, line 8
Namespace
Drupal\backup_migrate\Core\FileView source
interface BackupFileWritableInterface extends BackupFileReadableInterface {
/**
* Get the realpath of the file.
*
* @return string
* The path or stream URI to the file or NULL if the file does not exist.
*/
public function realpath();
/**
* Write a line to the file.
*
* @param string $data
* A string to write to the file.
*/
public function write($data);
/**
* Open the file, write the given contents and close it.
*
* Used for small amounts of data that can fit in memory.
*
* @param string $data
* The contents to write.
*/
public function writeAll($data);
/**
* 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(array $values);
/**
* Open a file for reading or writing.
*
* @param bool $binary
* If true open as a binary file.
*/
public function openForWrite($binary = FALSE);
/**
* Close a file when we're done reading/writing.
*/
public function close();
}
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 the file name without extension. | 1 |
BackupFileReadableInterface:: |
public | function | Open a file for reading or writing. | 1 |
BackupFileReadableInterface:: |
public | function | Read a line from the file. | 1 |
BackupFileReadableInterface:: |
public | function | Read a given number of bytes from the file. | 1 |
BackupFileReadableInterface:: |
public | function | Read a single line from the file. | 1 |
BackupFileReadableInterface:: |
public | function | Rewind the file handle to the start of the file. | 1 |
BackupFileReadableInterface:: |
public | function | Move the file pointer forward a given number of bytes. | 1 |
BackupFileWritableInterface:: |
public | function |
Close a file when we're done reading/writing. Overrides BackupFileReadableInterface:: |
|
BackupFileWritableInterface:: |
public | function | Open a file for reading or writing. | 1 |
BackupFileWritableInterface:: |
public | function |
Get the realpath of the file. Overrides BackupFileReadableInterface:: |
|
BackupFileWritableInterface:: |
public | function |
Set a metadata value. Overrides BackupFileInterface:: |
|
BackupFileWritableInterface:: |
public | function |
Set a metadata value. Overrides BackupFileInterface:: |
|
BackupFileWritableInterface:: |
public | function | Write a line to the file. | 1 |
BackupFileWritableInterface:: |
public | function | Open the file, write the given contents and close it. | 1 |