phpDocumentor

AutoUpdaterBackupHelper extends AbstractAutoUpdaterHelper
in package

Class AutoUpdaterBackupHelper

Table of Contents

$ajaxTimeout  : int
$availableBackups  : array<string|int, mixed>
$backupId  : string
$backupingFilesDone  : bool
$dataCache  : AutoUpdaterDataCache
$ftpManager  : AutoUpdaterFtpManager
$lastBackupedIndex  : int|null
$lastRestoredIndex  : int|null
$logControl  : LogControl
$newUpdateFiles  : array<string|int, mixed>
$progress  : float
$restoringFilesDone  : bool
$settings  : AutoUpdaterSettings
__construct()  : mixed
AutoUpdaterFilesystemHelper constructor.
backupFiles()  : string
Creates a backup by a given update and update files directory.
backupingFilesDone()  : bool
deleteBackup()  : mixed
Restores and backup by coping
deleteFile()  : bool
Copies a file.
getAvailableBackups()  : array<string|int, mixed>
Returns a list of available backups.
getBackupFileList()  : array<string|int, mixed>
Returns a list of files, that belongs to the given backup id.
getBackupId()  : string
getLastBackupedIndex()  : int
getLastRestoredIndex()  : int
getNewUpdateFiles()  : array<string|int, mixed>
getProgress()  : float
registerFtpManager()  : mixed
Registers the auto updater ftp manager.
restoreBackup()  : mixed
Restores and backup by coping
restoringFilesDone()  : bool
changeFileBasePath()  : string
Replaces the base directory path of a given file path with a new base directory path.
copyFile()  : bool
Copies a file.
createDebugLog()  : mixed
Creates a new debug log.
createDirectory()  : bool
Return true on success, otherwise false.
deleteDirectory()  : bool
Deletes a directory. Return true on success and false otherwise.
getDirectoryFiles()  : array<string|int, mixed>
Returns an array with all files inside a given directory and his subdirectories.
setCorrectChmodAndOwner()  : bool
Sets the file permissions and ownership correctly.

Properties

Methods

backupFiles()

Creates a backup by a given update and update files directory.

public backupFiles(AutoUpdaterUpdate $update, string $updateFilesDirectory[, string|null $backupId = null ][, array<string|int, mixed>|null $newUpdateFiles = null ][, int|null $lastBackupedIndex = null ]) : string
Parameters
$update : AutoUpdaterUpdate
$updateFilesDirectory : string
$backupId : string|null = null
$newUpdateFiles : array<string|int, mixed>|null = null
$lastBackupedIndex : int|null = null
Tags
throws
AutoUpdaterBackupCreationFailedException
Return values
string

getAvailableBackups()

Returns a list of available backups.

public getAvailableBackups() : array<string|int, mixed>
Return values
array<string|int, mixed>

getBackupFileList()

Returns a list of files, that belongs to the given backup id.

public getBackupFileList(string $backupId) : array<string|int, mixed>
Parameters
$backupId : string
Return values
array<string|int, mixed>

getNewUpdateFiles()

public getNewUpdateFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

changeFileBasePath()

Replaces the base directory path of a given file path with a new base directory path.

protected changeFileBasePath(string $file, string $oldBasePath, string $newBasePath) : string
Parameters
$file : string
$oldBasePath : string
$newBasePath : string
Return values
string

Returns new path of the file. If an error occurs the unmodified file path will be returned.

copyFile()

Copies a file.

protected copyFile(string $source, string $destination) : bool
Parameters
$source : string
$destination : string
Return values
bool

createDebugLog()

Creates a new debug log.

protected createDebugLog(string $message[, string|array<string|int, mixed> $additionalData = '' ]) : mixed
Parameters
$message : string
$additionalData : string|array<string|int, mixed> = ''
Return values
mixed

createDirectory()

Return true on success, otherwise false.

protected createDirectory(string $directory[, bool $writable = false ]) : bool
Parameters
$directory : string

Path of the new directory.

$writable : bool = false
Return values
bool

deleteDirectory()

Deletes a directory. Return true on success and false otherwise.

protected deleteDirectory(string $directory) : bool
Parameters
$directory : string
Return values
bool

getDirectoryFiles()

Returns an array with all files inside a given directory and his subdirectories.

protected getDirectoryFiles(string $directory) : array<string|int, mixed>
Parameters
$directory : string
Return values
array<string|int, mixed>

setCorrectChmodAndOwner()

Sets the file permissions and ownership correctly.

protected setCorrectChmodAndOwner(string $file[, null|string $chmod = null ][, null|string $owner = null ]) : bool
Parameters
$file : string
$chmod : null|string = null
$owner : null|string = null
Return values
bool

Search results