package
in
Package object
Table of Contents
REMOTEFILE_ERROR | Fehler beim Abrufen der Update-Server-Infos | 901 |
---|---|---|
LOCALFILE_ERROR | Fehler beim Öffnen der lokalen Datei | 902 |
LOCALWRITE_ERROR | Fehler beim Schreiben der Daten in die lokalen Datei | 903 |
LOCALEXISTS_ERROR | Prüfung, dass Datei lokal vorhanden ist schlägt fehl | 904 |
HASHCHECK_ERROR | Hash-Wert stimmt nicht überein | 905 |
ZIPOPEN_ERROR | ZIP-Archiv kann nicht geöffnet werden | 906 |
ZIPEXTRACT_ERROR | Fehler beim Entpacken des ZIP-Archivs | 907 |
FILESCOPY_ERROR | Fehler beim kopieren der Paket-Dateien | 908 |
FILESCHECK_ERROR | Fehler bei Schreibrechte-Prüfung vorhandener Dateien | 909 |
REMOTEPATH_UNTRUSTED | Fehler bei Schreibrechte-Prüfung vorhandener Dateien | 910 |
DEFAULT_EXTENSION | Fehler bei Schreibrechte-Prüfung vorhandener Dateien | 'zip' |
$packageName | Package name | string |
$archive | ZIP-Archiv-Object | ZipArchive |
$data | Internal cache | mixed |
$preValidate | Prevalidation failed | mixed |
__construct() | Konstruktor | mixed |
getPackageKey() | Returns full /data/config/package.key file path | string |
initObjects() | Initialize objects | bool |
getRemotePath() | Returns remote package path | string |
getRemoteSignature() | Returns remote package signature string | string |
getLocalPath() | Returns local path for package file | string |
getLocalSignature() | Returns local package hash | string |
getExtractionPath() | Returns local path to extract archive | string |
getLocalDestinationPath() | Returns local destination path for packeg content | string |
checkFiles() | Checks local filesystem if files are writable | bool |
copy() | Updates files in local file system | bool |
updateLog() | Updates local package manager log | bool |
extractionValidateArchiveData() | Validate archive content after opening archive | bool |
isTrustedPath() | Check if remote path points to trusted server | bool |
download() | Fetch package content from package server | bool |
checkPackage() | Validates package signature | bool |
extract() | Extract package file | bool |
cleanup() | Performs cleanup of update files and cache | bool |
isPreValidated() | Return prevalidation flag | bool |
replaceFanPressBaseFolder() | Replaces "fanpress" base folder name in given path | string |
explodeModuleFileName() | Split filename for module key | array |
updateProtocol() | Updates protocoll data for file system update | bool |
getFileList() | Fetch array of local file system files from "files.txt" file | array |
Constants
REMOTEFILE_ERROR
Fehler beim Abrufen der Update-Server-Infos
mixed
$REMOTEFILE_ERROR
= 901
LOCALFILE_ERROR
Fehler beim Öffnen der lokalen Datei
mixed
$LOCALFILE_ERROR
= 902
LOCALWRITE_ERROR
Fehler beim Schreiben der Daten in die lokalen Datei
mixed
$LOCALWRITE_ERROR
= 903
LOCALEXISTS_ERROR
Prüfung, dass Datei lokal vorhanden ist schlägt fehl
mixed
$LOCALEXISTS_ERROR
= 904
HASHCHECK_ERROR
Hash-Wert stimmt nicht überein
mixed
$HASHCHECK_ERROR
= 905
ZIPOPEN_ERROR
ZIP-Archiv kann nicht geöffnet werden
mixed
$ZIPOPEN_ERROR
= 906
ZIPEXTRACT_ERROR
Fehler beim Entpacken des ZIP-Archivs
mixed
$ZIPEXTRACT_ERROR
= 907
FILESCOPY_ERROR
Fehler beim kopieren der Paket-Dateien
mixed
$FILESCOPY_ERROR
= 908
FILESCHECK_ERROR
Fehler bei Schreibrechte-Prüfung vorhandener Dateien
mixed
$FILESCHECK_ERROR
= 909
REMOTEPATH_UNTRUSTED
Fehler bei Schreibrechte-Prüfung vorhandener Dateien
mixed
$REMOTEPATH_UNTRUSTED
= 910
DEFAULT_EXTENSION
Fehler bei Schreibrechte-Prüfung vorhandener Dateien
mixed
$DEFAULT_EXTENSION
= 'zip'
Properties
$packageName
Package name
protected
string
$packageName
= ''
$archive
ZIP-Archiv-Object
protected
ZipArchive
$archive
$data
Internal cache
protected
mixed
$data
$preValidate
Prevalidation failed
protected
mixed
$preValidate
= true
Methods
__construct()
Konstruktor
public
final __construct(
$packageName :
string
)
: mixed
Parameters
- $packageName : string
Return values
mixedgetPackageKey()
Returns full /data/config/package.key file path
protected
getPackageKey(
)
: string
Return values
stringinitObjects()
Initialize objects
protected
abstract initObjects(
)
: bool
Return values
boolgetRemotePath()
Returns remote package path
protected
abstract getRemotePath(
)
: string
Return values
stringgetRemoteSignature()
Returns remote package signature string
protected
abstract getRemoteSignature(
)
: string
Return values
stringgetLocalPath()
Returns local path for package file
protected
abstract getLocalPath(
)
: string
Return values
stringgetLocalSignature()
Returns local package hash
protected
abstract getLocalSignature(
)
: string
Return values
stringgetExtractionPath()
Returns local path to extract archive
protected
abstract getExtractionPath(
)
: string
Return values
stringgetLocalDestinationPath()
Returns local destination path for packeg content
protected
abstract getLocalDestinationPath(
)
: string
Return values
stringcheckFiles()
Checks local filesystem if files are writable
public
abstract checkFiles(
)
: bool
Return values
boolcopy()
Updates files in local file system
public
abstract copy(
)
: bool
Return values
boolupdateLog()
Updates local package manager log
public
abstract updateLog(
)
: bool
Return values
boolextractionValidateArchiveData()
Validate archive content after opening archive
public
abstract extractionValidateArchiveData(
)
: bool
Tags
Return values
boolisTrustedPath()
Check if remote path points to trusted server
public
final isTrustedPath(
)
: bool
Return values
booldownload()
Fetch package content from package server
public
download(
[ $progress :
progress
= null ]
)
: bool
Parameters
- $progress : progress = null
Return values
boolcheckPackage()
Validates package signature
public
checkPackage(
)
: bool
Return values
boolextract()
Extract package file
public
extract(
)
: bool
Return values
boolcleanup()
Performs cleanup of update files and cache
public
cleanup(
)
: bool
Return values
boolisPreValidated()
Return prevalidation flag
public
isPreValidated(
)
: bool
Tags
Return values
boolreplaceFanPressBaseFolder()
Replaces "fanpress" base folder name in given path
protected
replaceFanPressBaseFolder(
$path :
string
)
: string
Parameters
- $path : string
Return values
stringexplodeModuleFileName()
Split filename for module key
public
static explodeModuleFileName(
$filename :
string
)
: array
Parameters
- $filename : string
Return values
arrayupdateProtocol()
Updates protocoll data for file system update
protected
updateProtocol(
$file :
string
, $success :
bool
)
: bool
Parameters
- $file : string
- $success : bool
Tags
Return values
boolgetFileList()
Fetch array of local file system files from "files.txt" file
protected
getFileList(
$path :
string
, $start :
int
)
: array
Parameters
- $path : string
- $start : int