BackupRepositoryInterface
in
Repository interface for backup operations.
This is a domain port defining the contract for backup/restore operations. Infrastructure implementations provide the actual database access.
Tags
Table of Contents
Methods
- generateBackupSql() : string
- Get backup SQL for all tables.
- generateOfficialBackupSql() : string
- Get official LWT format backup SQL.
- getBackupTables() : array<string|int, string>
- Get list of tables to backup.
- getDatabaseName() : string
- Get the database name.
- getOfficialBackupTables() : array<string|int, string>
- Get list of tables for official backup format.
- restoreFromHandle() : string
- Restore database from a file handle.
- truncateUserTables() : void
- Truncate all user data tables (keep settings).
Methods
generateBackupSql()
Get backup SQL for all tables.
public
generateBackupSql() : string
Return values
string —SQL dump content
generateOfficialBackupSql()
Get official LWT format backup SQL.
public
generateOfficialBackupSql() : string
Return values
string —SQL dump in official format
getBackupTables()
Get list of tables to backup.
public
getBackupTables() : array<string|int, string>
Return values
array<string|int, string> —Table names
getDatabaseName()
Get the database name.
public
getDatabaseName() : string
Return values
string —Database name
getOfficialBackupTables()
Get list of tables for official backup format.
public
getOfficialBackupTables() : array<string|int, string>
Return values
array<string|int, string> —Table names
restoreFromHandle()
Restore database from a file handle.
public
restoreFromHandle(resource $handle, string $fileName) : string
Parameters
- $handle : resource
-
File handle to read from
- $fileName : string
-
File name for logging
Return values
string —Status message
truncateUserTables()
Truncate all user data tables (keep settings).
public
truncateUserTables() : void