PHP Класс HM\BackUpWordPress\Database_Backup_Engine

All Database Backup Engine implementations should extend this class
Наследование: extends Backup_Engine
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$backup_filename string The filename for the resulting Backup

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

Метод Описание
__construct ( ) Setup some general database backup settings
backup ( ) : boolean Individual Database Backup Engine implementations must include a backup method at a minimum.
get_charset ( ) : string Get the database charset setting.
get_collate ( ) : string Get the database collate setting.
get_host ( ) : string Get the database hostname.
get_name ( ) : string Get the database name.
get_password ( ) : string Get the database password.
get_port ( ) : integer Get the database port.
get_socket ( ) : string Get the database socket.
get_user ( ) : string Get the database user.
parse_db_host_constant ( string $constant = 'DB_HOST' ) Parse the DB_HOST constant.
verify_backup ( ) : boolean Verify that the database backup was successful.

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

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

Child classes must call parent::__construct in their own constructor.
public __construct ( )

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

Individual Database Backup Engine implementations must include a backup method at a minimum.
abstract public backup ( ) : boolean
Результат boolean Whether the backup completed successfully or not.

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

Get the database charset setting.
public get_charset ( ) : string
Результат string The database charset.

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

Get the database collate setting.
public get_collate ( ) : string
Результат string The database collage setting.

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

Get the database hostname.
public get_host ( ) : string
Результат string The database hostname.

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

Get the database name.
public get_name ( ) : string
Результат string The database name.

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

Get the database password.
public get_password ( ) : string
Результат string The database password.

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

Get the database port.
public get_port ( ) : integer
Результат integer The database port.

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

Get the database socket.
public get_socket ( ) : string
Результат string The database socket.

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

Get the database user.
public get_user ( ) : string
Результат string The database user.

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

The DB_HOST constant potentially contains the hostname, port or socket. We need to parse it to figure out the type of mysql connection to make.
public parse_db_host_constant ( string $constant = 'DB_HOST' )
$constant string The Constant to parse. If the string isn't a defined Constant then it will be parsed directly.

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

It's important this function is performant as it's called after every backup.
public verify_backup ( ) : boolean
Результат boolean Whether the backup completed successfully

Описание свойств

$backup_filename публичное свойство

The filename for the resulting Backup
public string $backup_filename
Результат string