phpDocumentor

AutoUpdaterDownloadHelper extends AbstractAutoUpdaterHelper
in package

Class AutoUpdaterDownloadHelper

Table of Contents

$ajaxTimeout  : int
$curl  : AutoUpdaterCurlClient
$downloadingFilesDone  : bool
$ftpManager  : AutoUpdaterFtpManager
$lastDownloadedIndex  : int
$logControl  : LogControl
$progress  : float
$settings  : AutoUpdaterSettings
__construct()  : mixed
AutoUpdaterFilesystemHelper constructor.
deleteFile()  : bool
Copies a file.
downloadingFilesDone()  : mixed
downloadUpdate()  : mixed
Downloads a zip archive of a given update and extracts it. If the zip extension is not available on the web server, the downloadUpdateFilesSeparately method will be used as a fallback.
getLastDownloadedIndex()  : mixed
getProgress()  : mixed
registerFtpManager()  : mixed
Registers the auto updater ftp manager.
changeFileBasePath()  : string
Replaces the base directory path of a given file path with a new base directory path.
checkUnpackedFiles()  : mixed
Checks the unpacked files.
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.
downloadExternalFile()  : mixed
Downloads an external file with curl.
downloadUpdateFilesSeparately()  : mixed
Downloads all update files of a given update into a given update files directory.
extractZip()  : mixed
Extracts a given zip file to a given directory
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

downloadUpdate()

Downloads a zip archive of a given update and extracts it. If the zip extension is not available on the web server, the downloadUpdateFilesSeparately method will be used as a fallback.

public downloadUpdate(AutoUpdaterUpdate $update, string $updateFilesDirectory[, int|null $lastDownloadedIndex = null ]) : mixed
Parameters
$update : AutoUpdaterUpdate
$updateFilesDirectory : string
$lastDownloadedIndex : int|null = null
Tags
throws
AutoUpdaterUpdateDownloadFailedException
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.

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

downloadExternalFile()

Downloads an external file with curl.

protected downloadExternalFile(string $url, string $destination) : mixed
Parameters
$url : string
$destination : string
Return values
mixed

downloadUpdateFilesSeparately()

Downloads all update files of a given update into a given update files directory.

protected downloadUpdateFilesSeparately(AutoUpdaterUpdate $update, string $updateFilesDirectory[, int|null $lastDownloadedIndex = null ]) : mixed

This method is a fallback, if the zip extension is not available on the web server.

Parameters
$update : AutoUpdaterUpdate
$updateFilesDirectory : string
$lastDownloadedIndex : int|null = null
Tags
throws
AutoUpdaterUpdateDownloadFailedException
Return values
mixed

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