PHP 클래스 Services\Synchronize

파일 보기 프로젝트 열기: doptor/doptor 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$includes array What is backed up(can be database, modules, public directory)
$listener

공개 메소드들

메소드 설명
Unzip ( [type] $file, [type] $path ) Decompress a folder
Zip ( [type] $source, [type] $destination, $include_dir = true ) Compresses a folder
__construct ( $listener )
authorizeRemote ( Input $input ) : Guzzle\Service\Client Authorize the user on the remote server
backupDB ( string $current_time ) Create backup of the current database
backupModules ( string $current_time ) Backup all the modules installed
backupPublic ( string $current_time ) Backup the public folder
backupTables ( string $host, string $user, string $password, string $database, string $file_name, string $tables = '*' ) Generate a sql file of the current database
copyToRestore ( Input $input ) : string Copy the backup file received from the post data to the restore folder
dropTables ( ) Drop all the tables in the database
restore ( string $restore_file ) Restore the database and modules from the restore file
restoreDB ( string $restore_dir ) Restore the database from the restore folder
restoreModules ( string $restore_dir ) Restore all the modules
restorePublic ( string $restore_dir ) Restore public folder
saveBackupToDB ( $description = '' ) : Object Save the information of the created backup to database
startBackup ( $backup_db = true, $backup_modules = true, $backup_public = true )
startLocalToRemoteSync ( $input )
startRemoteToLocalSync ( $input )
syncFromRemote ( $current_time, $restore_file, $input )
syncToRemote ( string $current_time, [type] $backup_file, $input ) Send the backup file to remote server for synchronization

보호된 메소드들

메소드 설명
dbConnections ( )

메소드 상세

Unzip() 공개 메소드

Decompress a folder
public Unzip ( [type] $file, [type] $path )
$file [type]
$path [type]

Zip() 공개 메소드

Compresses a folder
public Zip ( [type] $source, [type] $destination, $include_dir = true )
$source [type]
$destination [type]

__construct() 공개 메소드

public __construct ( $listener )

authorizeRemote() 공개 메소드

Authorize the user on the remote server
public authorizeRemote ( Input $input ) : Guzzle\Service\Client
$input Input
리턴 Guzzle\Service\Client

backupDB() 공개 메소드

Create backup of the current database
public backupDB ( string $current_time )
$current_time string "Current time in string"

backupModules() 공개 메소드

Backup all the modules installed
public backupModules ( string $current_time )
$current_time string "Current time in string"

backupPublic() 공개 메소드

Backup the public folder
public backupPublic ( string $current_time )
$current_time string "Current time in string"

backupTables() 공개 메소드

Generate a sql file of the current database
public backupTables ( string $host, string $user, string $password, string $database, string $file_name, string $tables = '*' )
$host string
$user string
$password string
$database string
$file_name string
$tables string

copyToRestore() 공개 메소드

Copy the backup file received from the post data to the restore folder
public copyToRestore ( Input $input ) : string
$input Input "The post input data"
리턴 string "Filename"

dbConnections() 보호된 메소드

protected dbConnections ( )

dropTables() 공개 메소드

Drop all the tables in the database
public dropTables ( )

restore() 공개 메소드

Restore the database and modules from the restore file
public restore ( string $restore_file )
$restore_file string "The location of teh restore zip file"

restoreDB() 공개 메소드

Restore the database from the restore folder
public restoreDB ( string $restore_dir )
$restore_dir string

restoreModules() 공개 메소드

Restore all the modules
public restoreModules ( string $restore_dir )
$restore_dir string

restorePublic() 공개 메소드

Restore public folder
public restorePublic ( string $restore_dir )
$restore_dir string

saveBackupToDB() 공개 메소드

Save the information of the created backup to database
public saveBackupToDB ( $description = '' ) : Object
리턴 Object

startBackup() 공개 메소드

public startBackup ( $backup_db = true, $backup_modules = true, $backup_public = true )

startLocalToRemoteSync() 공개 메소드

public startLocalToRemoteSync ( $input )

startRemoteToLocalSync() 공개 메소드

public startRemoteToLocalSync ( $input )

syncFromRemote() 공개 메소드

public syncFromRemote ( $current_time, $restore_file, $input )

syncToRemote() 공개 메소드

Send the backup file to remote server for synchronization
public syncToRemote ( string $current_time, [type] $backup_file, $input )
$current_time string "Current time in string"
$backup_file [type]

프로퍼티 상세

$includes 보호되어 있는 프로퍼티

What is backed up(can be database, modules, public directory)
protected array $includes
리턴 array

$listener 보호되어 있는 프로퍼티

protected $listener