Documentation

module extends package

System package objekt

Table of Contents

$repo Repository object modules
$hashKey Hash value of module key string
$moduleKey Module key string
$packageName Package name string
$archive ZIP-Archiv-Object ZipArchive
$data Internal cache mixed
$preValidate Prevalidation failed mixed
initObjects() Initialize objects bool
replaceFanPressBaseFolder() Replaces "vendor/modules" key by module base path string
getFileListPath() Returns files.txt path string
getExtractionPath() Returns local path to extract archive string
getLocalDestinationPath() Returns local destination path for packeg content string
getLocalPath() Returns local path for package file string
getLocalSignature() Returns local package hash string
getRemotePath() Returns remote package path string
getRemoteSignature() Returns remote package signature string string
extractionValidateArchiveData() Validate archive content after opening archive bool
checkFiles() Checks local filesystem if files are writable bool
copy() Updates files in local file system bool
updateLog() Updates local package manager log bool
removeModuleBaseDir() Removes base folder from local package filepath string
__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

Properties

$hashKey

Hash value of module key

protected string $hashKey

$moduleKey

Module key

protected string $moduleKey

$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

initObjects()

Initialize objects

protected initObjects( ) : bool
Return values
bool

replaceFanPressBaseFolder()

Replaces "vendor/modules" key by module base path

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

getFileListPath()

Returns files.txt path

protected getFileListPath( ) : string
Return values
string

getExtractionPath()

Returns local path to extract archive

protected getExtractionPath( ) : string
Return values
string

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

extractionValidateArchiveData()

Validate archive content after opening archive

public extractionValidateArchiveData( ) : bool
Tags
since
Return values
bool

checkFiles()

Checks local filesystem if files are writable

public checkFiles( ) : bool
Return values
bool

copy()

Updates files in local file system

public copy( ) : bool
Return values
bool

updateLog()

Updates local package manager log

public updateLog( ) : bool
Return values
bool

removeModuleBaseDir()

Removes base folder from local package filepath

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

__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