phpDocumentor

AutoUpdaterUpdatesHelper extends AbstractAutoUpdaterHelper
in package

Class AutoUpdaterUpdatesHelper

Table of Contents

$ajaxTimeout  : int
$copyingFilesIntoShopDone  : bool
$ftpManager  : AutoUpdaterFtpManager
$lastCopiedIndex  : int|null
$logControl  : LogControl
$progress  : float
$settings  : AutoUpdaterSettings
$updateStatusLifetime  : int
$availableUpdates  : array<string|int, mixed>
$curl  : AutoUpdaterCurlClient
$dataCache  : DataCache
$db  : CI_DB_query_builder
$updateStatus  : array<string|int, mixed>
__construct()  : mixed
AutoUpdaterUpdatesChecker constructor.
areUninstalledUpdatesAvailable()  : bool
Checks if there are downloaded update, that not have been installed.
areUpdatesAvailable()  : bool
Checks if updates are available.
callHome()  : mixed
Calls home and sends some feedback about the update processing
checkFilesPermissions()  : array<string|int, mixed>
Checks the writing permissions of all needed directories for an update by a given update files directory.
checkFilesPermissionsWithFileList()  : array<string|int, mixed>
Checks the writing permissions of all needed directories for an update by a given update files directory.
copyFilesIntoShop()  : int|null
Copies the update files into the shop.
copyingFilesIntoShopDone()  : mixed
deleteFile()  : bool
Copies a file.
deleteInfoboxMessage()  : mixed
Marks the admin infobox message with the given identifier as deleted.
deleteUpdateDirectory()  : bool
Deletes a given update files directory.
deleteUpdatesDirectory()  : bool
Deletes the updates directory. Return true on success and false otherwise.
getAvailableUpdates()  : array<string|int, mixed>
Returns a list of all available updates as an array.
getLastCopiedIndex()  : mixed
getProcessingStatus()  : mixed
getProgress()  : float
getUpdateCheckResponse()  : mixed
Returns the update check response of the update server.
registerFtpManager()  : mixed
Registers the auto updater ftp manager.
resetVersionHistoryName()  : mixed
Removes the version history entry of an update by a given version history name.
setProcessingStatus()  : mixed
changeFileBasePath()  : string
Replaces the base directory path of a given file path with a new base directory path.
collectShopInformation()  : array<string|int, mixed>
Collects all shop information that are needed for the update server.
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.
determineDownloadedUpdates()  : mixed
Returns the shop key from database.
determineExistingReceiptFiles()  : mixed
Returns the version receipts from filesystem.
determineInstalledUpdates()  : mixed
Returns a db dump of the version history table as an array.
determineShopKey()  : mixed
Returns the shop key.
determineShopVersion()  : mixed
Returns the shop key.
determineUpdateName()  : string
Determines the version of the version info items while considering known edge cases.
getDirectoryFiles()  : array<string|int, mixed>
Returns an array with all files inside a given directory and his subdirectories.
hasUpdateBeenInstalled()  : bool
Checks the version history database table if the given version is installed.
setCorrectChmodAndOwner()  : bool
Sets the file permissions and ownership correctly.

Properties

Methods

areUninstalledUpdatesAvailable()

Checks if there are downloaded update, that not have been installed.

public areUninstalledUpdatesAvailable() : bool
Return values
bool

True, if uninstalled downloaded updates are available, otherwise false.

areUpdatesAvailable()

Checks if updates are available.

public areUpdatesAvailable() : bool
Tags
throws
AutoUpdaterException

If connection to update server failed.

Return values
bool

True, if updates are available, otherwise false.

callHome()

Calls home and sends some feedback about the update processing

public callHome(string $message[, string $selectedUpdate = '' ][, array<string|int, mixed> $wrongPermittedFiles = [] ][, Exception|null $exception = null ]) : mixed
Parameters
$message : string
$selectedUpdate : string = ''
$wrongPermittedFiles : array<string|int, mixed> = []
$exception : Exception|null = null
Return values
mixed

checkFilesPermissions()

Checks the writing permissions of all needed directories for an update by a given update files directory.

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

checkFilesPermissionsWithFileList()

Checks the writing permissions of all needed directories for an update by a given update files directory.

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

deleteInfoboxMessage()

Marks the admin infobox message with the given identifier as deleted.

public deleteInfoboxMessage( $infoboxIdentifier) : mixed
Parameters
$infoboxIdentifier :

string

Return values
mixed

deleteUpdateDirectory()

Deletes a given update files directory.

public deleteUpdateDirectory(string $updateFilesDirectory) : bool
Parameters
$updateFilesDirectory : string
Return values
bool

deleteUpdatesDirectory()

Deletes the updates directory. Return true on success and false otherwise.

public deleteUpdatesDirectory() : bool
Return values
bool

getAvailableUpdates()

Returns a list of all available updates as an array.

public getAvailableUpdates() : array<string|int, mixed>
Tags
throws
AutoUpdaterException

If connection to update server failed.

deprecated
Return values
array<string|int, mixed>

getProcessingStatus()

public getProcessingStatus(string $updateId) : mixed
Parameters
$updateId : string
Return values
mixed

resetVersionHistoryName()

Removes the version history entry of an update by a given version history name.

public resetVersionHistoryName( $versionHistoryName) : mixed
Parameters
$versionHistoryName :

string

Return values
mixed

setProcessingStatus()

public setProcessingStatus(string $updateId, mixed $status) : mixed
Parameters
$updateId : string
$status : mixed
Return values
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.

collectShopInformation()

Collects all shop information that are needed for the update server.

protected collectShopInformation() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

determineDownloadedUpdates()

Returns the shop key from database.

protected determineDownloadedUpdates() : mixed
Return values
mixed

determineExistingReceiptFiles()

Returns the version receipts from filesystem.

protected determineExistingReceiptFiles() : mixed
Return values
mixed

determineInstalledUpdates()

Returns a db dump of the version history table as an array.

protected determineInstalledUpdates() : mixed
Return values
mixed

determineUpdateName()

Determines the version of the version info items while considering known edge cases.

protected determineUpdateName(string $receiptFilePath) : string
Parameters
$receiptFilePath : string
Return values
string

$version

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>

hasUpdateBeenInstalled()

Checks the version history database table if the given version is installed.

protected hasUpdateBeenInstalled(mixed $updateName) : bool
Parameters
$updateName : mixed
Return values
bool

Returns true, if the given version is installed, otherwise false.

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