Table of Contents
Constants
-
CANCEL
= 'jeedomRecoveryCancellation'
-
DEFAULT_IMGNAME
= 'JeedomSystemUpdate.img.gz'
-
PROGRESS
= 'jeedomRecovery'
Methods
-
cancel()
: void
-
getProgress()
: mixed
-
install()
: bool
-
isInstalled()
: bool
-
start()
: bool
-
usbConnected()
: string|false
-
calculPercentProgress()
: float
-
checkFreeSpace()
: void
-
downloadAndValidateImage()
: void
-
downloadImageProgress()
: void|int
-
getImgInfos()
: array<string|int, mixed>|void
-
prepareUsbDevice()
: void
-
setProgress()
: void
-
validateImage()
: void
-
writeLog()
: void
CANCEL
private
mixed
CANCEL
= 'jeedomRecoveryCancellation'
DEFAULT_IMGNAME
private
mixed
DEFAULT_IMGNAME
= 'JeedomSystemUpdate.img.gz'
PROGRESS
private
mixed
PROGRESS
= 'jeedomRecovery'
cancel()
public
static cancel() : void
getProgress()
public
static getProgress() : mixed
install()
public
static install([bool $_force = false ]) : bool
Parameters
-
$_force
: bool
= false
-
isInstalled()
public
static isInstalled() : bool
start()
public
static start(string $_hardware[, string $_mode = 'auto' ]) : bool
Parameters
-
$_hardware
: string
-
-
$_mode
: string
= 'auto'
-
usbConnected()
public
static usbConnected(string $_hardware) : string|false
Parameters
-
$_hardware
: string
-
Return values
string|false
calculPercentProgress()
private
static calculPercentProgress(mixed $_done, mixed $_total[, float $_max = 100 ][, float $_base = 0 ]) : float
Parameters
-
$_done
: mixed
-
-
$_total
: mixed
-
-
$_max
: float
= 100
-
-
$_base
: float
= 0
-
checkFreeSpace()
private
static checkFreeSpace(string $_path[, int $_imgSize = 1500000 ]) : void
Parameters
-
$_path
: string
-
-
$_imgSize
: int
= 1500000
-
downloadAndValidateImage()
private
static downloadAndValidateImage(string $_url, string $_filepath, string $_sha256) : void
Parameters
-
$_url
: string
-
-
$_filepath
: string
-
-
$_sha256
: string
-
downloadImageProgress()
private
static downloadImageProgress(mixed $_resource, mixed $_downloadSize, mixed $_downloaded) : void|int
Parameters
-
$_resource
: mixed
-
-
$_downloadSize
: mixed
-
-
$_downloaded
: mixed
-
getImgInfos()
private
static getImgInfos(string $_hardware) : array<string|int, mixed>|void
Parameters
-
$_hardware
: string
-
Return values
array<string|int, mixed>|void
prepareUsbDevice()
private
static prepareUsbDevice(string $_hardware[, string $_mountPath = '/mnt/usb' ]) : void
Parameters
-
$_hardware
: string
-
-
$_mountPath
: string
= '/mnt/usb'
-
setProgress()
private
static setProgress(array<string|int, mixed> $_progress[, int $_pause = null ]) : void
Parameters
-
$_progress
: array<string|int, mixed>
-
-
$_pause
: int
= null
-
validateImage()
private
static validateImage(string $_filepath, string $_sha256[, bool $_downloaded = true ]) : void
Parameters
-
$_filepath
: string
-
-
$_sha256
: string
-
-
$_downloaded
: bool
= true
-
writeLog()
private
static writeLog(string $_message[, string $_level = 'info' ]) : void
Parameters
-
$_message
: string
-
-
$_level
: string
= 'info'
-