Documentation

package

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
mixed

getPackageKey()

Returns full /data/config/package.key file path

protected getPackageKey( ) : string
Return values
string

initObjects()

Initialize objects

protected abstract initObjects( ) : bool
Return values
bool

getRemotePath()

Returns remote package path

protected abstract getRemotePath( ) : string
Return values
string

getRemoteSignature()

Returns remote package signature string

protected abstract getRemoteSignature( ) : string
Return values
string

getLocalPath()

Returns local path for package file

protected abstract getLocalPath( ) : string
Return values
string

getLocalSignature()

Returns local package hash

protected abstract getLocalSignature( ) : string
Return values
string

getExtractionPath()

Returns local path to extract archive

protected abstract getExtractionPath( ) : string
Return values
string

getLocalDestinationPath()

Returns local destination path for packeg content

protected abstract getLocalDestinationPath( ) : string
Return values
string

checkFiles()

Checks local filesystem if files are writable

public abstract checkFiles( ) : bool
Return values
bool

copy()

Updates files in local file system

public abstract copy( ) : bool
Return values
bool

updateLog()

Updates local package manager log

public abstract updateLog( ) : bool
Return values
bool

extractionValidateArchiveData()

Validate archive content after opening archive

public abstract extractionValidateArchiveData( ) : bool
Tags
since
Return values
bool

isTrustedPath()

Check if remote path points to trusted server

public final isTrustedPath( ) : bool
Return values
bool

download()

Fetch package content from package server

public download( [ $progress : progress = null ] ) : bool
Parameters
$progress : progress = null
Return values
bool

checkPackage()

Validates package signature

public checkPackage( ) : bool
Return values
bool

extract()

Extract package file

public extract( ) : bool
Return values
bool

cleanup()

Performs cleanup of update files and cache

public cleanup( ) : bool
Return values
bool

isPreValidated()

Return prevalidation flag

public isPreValidated( ) : bool
Tags
since
Return values
bool

replaceFanPressBaseFolder()

Replaces "fanpress" base folder name in given path

protected replaceFanPressBaseFolder( $path : string ) : string
Parameters
$path : string
Return values
string

explodeModuleFileName()

Split filename for module key

public static explodeModuleFileName( $filename : string ) : array
Parameters
$filename : string
Return values
array

updateProtocol()

Updates protocoll data for file system update

protected updateProtocol( $file : string , $success : bool ) : bool
Parameters
$file : string
$success : bool
Tags
see
since
Return values
bool

getFileList()

Fetch array of local file system files from "files.txt" file

protected getFileList( $path : string , $start : int ) : array
Parameters
$path : string
$start : int
Return values
array

Search results