AutoUpdater

Class AutoUpdater

package

Default

Methods

AutoUpdater constructor.

__construct(\AutoUpdaterSettings $settings, \AutoUpdaterBackupHelper $backupHelper, \AutoUpdaterUpdatesHelper $updatesHelper, \AutoUpdaterDownloadHelper $downloadHelper, \LogControl $logControl) 

Arguments

$backupHelper

\AutoUpdaterBackupHelper

$updatesHelper

\AutoUpdaterUpdatesHelper

$downloadHelper

\AutoUpdaterDownloadHelper

$logControl

\LogControl

Activates the ftp manager. After activation all filesystem actions will be primary done with (s)ftp.

activateFtpManager(\AutoUpdaterFtpManager $ftpManager) 

Arguments

Checks if there are uninstalled updates.

areUninstalledUpdatesAvailable() : boolean

Response

boolean

Returns true, if there are uninstalled updates, otherwise false.

Calls home and sends some feedback about the update processing

callHome(string $message, string $updateId = '', \Exception|null $exception = null) 

Arguments

$message

string

$updateId

string

$exception

\Exception|null

Checks the writing permissions for a given list of files.

checkFilesPermissionsForBackup( $backupId) : boolean

Arguments

$backupId

Response

boolean

Checks the writing permissions for a given list of files.

checkFilesPermissionsWithFileList(array $fileList) : boolean

Arguments

$fileList

array

Response

boolean

Creates a new debug log.

createDebugLog(string $message, string|array $additionalData = '') 

Arguments

$message

string

$additionalData

string|array

Deletes a backup by a given id.

deleteBackup(string $backupId) 
Throws
\AutoUpdaterBackupRestoreFailedException

Arguments

$backupId

string

Returns an update instance by a given update id.

fetchUpdateById(string $updateId) : \AutoUpdaterUpdate
Throws
\AutoUpdaterException

Arguments

$updateId

string

Response

\AutoUpdaterUpdate

Returns a list of all available backups.

getAvailableBackups() : array

Response

array

Returns a list of all available updates.

getAvailableUpdates() : array
Throws
\AutoUpdaterException

Response

array

Returns a list of files, that are wrong permitted.

getWrongPermittedFiles() : array

Response

array

Installs a single given update.

processUpdate(string $selectedUpdate) : array
Throws
\AutoUpdaterBackupCreationFailedException
\AutoUpdaterBackupRestoreFailedException
\AutoUpdaterUpdateDownloadFailedException
\AutoUpdaterMissingPermissionException
\AutoUpdaterException
\Exception

Arguments

$selectedUpdate

string

Response

array

Restores a backup by a given id.

restoreBackup(string $backupId, integer|null $lastRestoredIndex = null) : array
Throws
\AutoUpdaterBackupRestoreFailedException

Arguments

$backupId

string

$lastRestoredIndex

integer|null

Response

array

Properties

settings

settings : \AutoUpdaterSettings
var

Type(s)

\AutoUpdaterSettings

backupHelper

backupHelper : \AutoUpdaterBackupHelper

updatesHelper

updatesHelper : \AutoUpdaterUpdatesHelper

downloadHelper

downloadHelper : \AutoUpdaterDownloadHelper

wrongPermittedFiles

wrongPermittedFiles : array
var

Type(s)

array

logControl

logControl : \LogControl
var

Type(s)

\LogControl