PHP Класс HM\BackUpWordPress\Backup_Engine

Base Backup Engine types should extend this class and call parent::__construct in there constructor. Defines base functionality shared across all types of backups
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( )
error ( string $context, string $error ) Add an error to the errors array.
error_handler ( integer $type ) : boolean Hooked into set_error_handler to catch any PHP errors that happen during the backup process.
get_backup_filename ( ) : string Get the filename of the backup.
get_backup_filepath ( ) : string Get the full filepath to the backup file.
get_errors ( string | null $context = null ) : array Get the array of errors encountered during the backup process.
get_warnings ( string | null $context = null ) : array Get the array of warnings encountered during the backup process.
set_backup_filename ( string $filename ) Set the filename of the backup.
verify_backup ( ) : boolean Backup Engine Types should always implement the verify_backup method.
warning ( string $context, string $warning ) Add an warning to the errors warnings.

Описание методов

__construct() публичный Метод

public __construct ( )

error() публичный Метод

An error is always treat as fatal and should only be used for unrecoverable issues with the backup process.
public error ( string $context, string $error )
$context string The context for the error.
$error string The error that was encountered.

error_handler() публичный Метод

PHP errors are always treat as warnings rather than errors.
public error_handler ( integer $type ) : boolean
$type integer The level of error raised.
Результат boolean Return false to pass the error back to PHP so it can be handled natively.

get_backup_filename() публичный Метод

Get the filename of the backup.
public get_backup_filename ( ) : string
Результат string The backup filename.

get_backup_filepath() публичный Метод

Get the full filepath to the backup file.
public get_backup_filepath ( ) : string
Результат string The backup filepath.

get_errors() публичный Метод

Get the array of errors encountered during the backup process.
public get_errors ( string | null $context = null ) : array
$context string | null The context for the error, usually the Backup Engine that encountered the error.
Результат array The array of errors.

get_warnings() публичный Метод

Get the array of warnings encountered during the backup process.
public get_warnings ( string | null $context = null ) : array
$context string | null The context for the warning, usually the Backup Engine that encountered the warning.
Результат array The array of warnings.

set_backup_filename() публичный Метод

Set the filename of the backup.
public set_backup_filename ( string $filename )
$filename string The backup filename.

verify_backup() абстрактный публичный Метод

Backup Engine Types should always implement the verify_backup method.
abstract public verify_backup ( ) : boolean
Результат boolean Whether the backup completed successfully or not.

warning() публичный Метод

A warning is always treat as non-fatal and should only be used for recoverable issues with the backup process.
public warning ( string $context, string $warning )
$context string The context for the warning.
$warning string The warning that was encountered.