Documentation

module extends package
in package

System package objekt

Tags
author

Stefan Seehafer sea75300@yahoo.de

copyright

(c) 2011-2022, Stefan Seehafer

since
3.1

Table of Contents

DEFAULT_EXTENSION  = 'zip'
Fehler bei Schreibrechte-Prüfung vorhandener Dateien
FILESCHECK_ERROR  = 909
Fehler bei Schreibrechte-Prüfung vorhandener Dateien
FILESCOPY_ERROR  = 908
Fehler beim kopieren der Paket-Dateien
HASHCHECK_ERROR  = 905
Hash-Wert stimmt nicht überein
LOCALEXISTS_ERROR  = 904
Prüfung, dass Datei lokal vorhanden ist schlägt fehl
LOCALFILE_ERROR  = 902
Fehler beim Öffnen der lokalen Datei
LOCALWRITE_ERROR  = 903
Fehler beim Schreiben der Daten in die lokalen Datei
REMOTEFILE_ERROR  = 901
Fehler beim Abrufen der Update-Server-Infos
REMOTEPATH_UNTRUSTED  = 910
Fehler bei Schreibrechte-Prüfung vorhandener Dateien
ZIPEXTRACT_ERROR  = 907
Fehler beim Entpacken des ZIP-Archivs
ZIPOPEN_ERROR  = 906
ZIP-Archiv kann nicht geöffnet werden
$archive  : ZipArchive
ZIP-Archiv-Object
$data  : mixed
Internal cache
$hashKey  : string
Hash value of module key
$moduleKey  : string
Module key
$packageName  : string
Package name
$preValidate  : mixed
Prevalidation failed
$repo  : modules
Repository object
__construct()  : mixed
Konstruktor
checkFiles()  : bool
Checks local filesystem if files are writable
checkPackage()  : bool
Validates package signature
cleanup()  : bool
Performs cleanup of update files and cache
copy()  : bool
Updates files in local file system
download()  : bool
Fetch package content from package server
explodeModuleFileName()  : array<string|int, mixed>
Split filename for module key
extract()  : bool
Extract package file
extractionValidateArchiveData()  : bool
Validate archive content after opening archive
getLocalDestinationPath()  : string
Returns local destination path for packeg content
getLocalPath()  : string
Returns local path for package file
getLocalSignature()  : string
Returns local package hash
getRemotePath()  : string
Returns remote package path
getRemoteSignature()  : string
Returns remote package signature string
isPreValidated()  : bool
Return prevalidation flag
isTrustedPath()  : bool
Check if remote path points to trusted server
updateLog()  : bool
Updates local package manager log
getExtractionPath()  : string
Returns local path to extract archive
getFileList()  : array<string|int, mixed>
Fetch array of local file system files from "files.txt" file
getFileListPath()  : string
Returns files.txt path
getPackageKey()  : string
Returns full /data/config/package.key file path
initObjects()  : bool
Initialize objects
replaceFanPressBaseFolder()  : string
Replaces "vendor/modules" key by module base path
updateProtocol()  : bool
Updates protocoll data for file system update
removeModuleBaseDir()  : string
Removes base folder from local package filepath

Constants

DEFAULT_EXTENSION

Fehler bei Schreibrechte-Prüfung vorhandener Dateien

public mixed DEFAULT_EXTENSION = 'zip'
Tags
since
3.5

FILESCHECK_ERROR

Fehler bei Schreibrechte-Prüfung vorhandener Dateien

public mixed FILESCHECK_ERROR = 909
Tags
since
3.5

FILESCOPY_ERROR

Fehler beim kopieren der Paket-Dateien

public mixed FILESCOPY_ERROR = 908

HASHCHECK_ERROR

Hash-Wert stimmt nicht überein

public mixed HASHCHECK_ERROR = 905

LOCALEXISTS_ERROR

Prüfung, dass Datei lokal vorhanden ist schlägt fehl

public mixed LOCALEXISTS_ERROR = 904

LOCALFILE_ERROR

Fehler beim Öffnen der lokalen Datei

public mixed LOCALFILE_ERROR = 902

LOCALWRITE_ERROR

Fehler beim Schreiben der Daten in die lokalen Datei

public mixed LOCALWRITE_ERROR = 903

REMOTEFILE_ERROR

Fehler beim Abrufen der Update-Server-Infos

public mixed REMOTEFILE_ERROR = 901

REMOTEPATH_UNTRUSTED

Fehler bei Schreibrechte-Prüfung vorhandener Dateien

public mixed REMOTEPATH_UNTRUSTED = 910
Tags
since
3.5

ZIPEXTRACT_ERROR

Fehler beim Entpacken des ZIP-Archivs

public mixed ZIPEXTRACT_ERROR = 907

ZIPOPEN_ERROR

ZIP-Archiv kann nicht geöffnet werden

public mixed ZIPOPEN_ERROR = 906

Properties

$archive

ZIP-Archiv-Object

protected ZipArchive $archive

$data

Internal cache

protected mixed $data

$hashKey

Hash value of module key

protected string $hashKey

$moduleKey

Module key

protected string $moduleKey

$packageName

Package name

protected string $packageName = ''

$preValidate

Prevalidation failed

protected mixed $preValidate = true

Methods

__construct()

Konstruktor

public final __construct(string $packageName) : mixed
Parameters
$packageName : string
Return values
mixed

checkFiles()

Checks local filesystem if files are writable

public checkFiles() : bool
Return values
bool

checkPackage()

Validates package signature

public checkPackage() : bool
Return values
bool

cleanup()

Performs cleanup of update files and cache

public cleanup() : bool
Return values
bool

copy()

Updates files in local file system

public copy() : bool
Return values
bool

download()

Fetch package content from package server

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

explodeModuleFileName()

Split filename for module key

public static explodeModuleFileName(string $filename) : array<string|int, mixed>
Parameters
$filename : string
Return values
array<string|int, mixed>

extract()

Extract package file

public extract() : bool
Return values
bool

extractionValidateArchiveData()

Validate archive content after opening archive

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

getLocalDestinationPath()

Returns local destination path for packeg content

public getLocalDestinationPath() : string
Return values
string

getLocalPath()

Returns local path for package file

public getLocalPath() : string
Return values
string

getLocalSignature()

Returns local package hash

public getLocalSignature() : string
Return values
string

getRemotePath()

Returns remote package path

public getRemotePath() : string
Return values
string

getRemoteSignature()

Returns remote package signature string

public getRemoteSignature() : string
Return values
string

isPreValidated()

Return prevalidation flag

public isPreValidated() : bool
Tags
since
4.5
Return values
bool

isTrustedPath()

Check if remote path points to trusted server

public final isTrustedPath() : bool
Return values
bool

updateLog()

Updates local package manager log

public updateLog() : bool
Return values
bool

getExtractionPath()

Returns local path to extract archive

protected getExtractionPath() : string
Return values
string

getFileList()

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

protected getFileList(string $path, int $start) : array<string|int, mixed>
Parameters
$path : string
$start : int
Return values
array<string|int, mixed>

getFileListPath()

Returns files.txt path

protected getFileListPath() : string
Return values
string

getPackageKey()

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

protected getPackageKey() : string
Return values
string

initObjects()

Initialize objects

protected initObjects() : bool
Return values
bool

replaceFanPressBaseFolder()

Replaces "vendor/modules" key by module base path

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

updateProtocol()

Updates protocoll data for file system update

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

removeModuleBaseDir()

Removes base folder from local package filepath

private removeModuleBaseDir(string $item) : string
Parameters
$item : string
Tags
see
module::getLocalDestinationPath
Return values
string

Search results