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
파일 보기 프로젝트 열기: humanmade/backupwordpress 1 사용 예제들

공개 메소드들

메소드 설명
__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.