Documentation

logfile extends file

Log file object

Table of Contents

FPCM_LOGFILETYPE_SYSTEM Systemlog 1
FPCM_LOGFILETYPE_PHP Error-Log 2
FPCM_LOGFILETYPE_SQL SQl-Log 3
FPCM_LOGFILETYPE_PKGMGR Paket Manager Log 4
FPCM_LOGFILETYPE_CRON Cronjobs Log 5
FPCM_LOGFILETYPE_EVENTS Events Log 6
$fileMap Mapping für Integer-Logtyp auf intere Datei * 1 = Systemlog * 2 = Errorlog * 3 = Sqlog * 4 = Paketmanagerlog * 5 = Cronjobslog * 6 =Eventslogs array
$table Tabellen-Name string
$dbcon DB-Verbindung database
$cache Cache-Objekt cache
$events Event-Liste events
$config System-Config-Objekt config
$language System-Sprachen-Objekt language
$notifications Notifications notifications
$filename Dateiname string
$filepath Dateispfad string
$fullpath Dateipfad inkl. Dateiname string
$extension Dateierweiterung string
$filesize Dateigröße int
$content Dateiinhalt string
$data data-Array für nicht weiter definierte Eigenschaften array
$cacheName Cache name string
$cacheModule Cache Modul string
__construct() Konstruktor bool
basePath() Returns base path for file string
save() Speichert eine neue temporäre Datei in data/temp/ bool
clear() Logdatei leeren bool
fetchData() Logdatei auslesen array
init() Initialisiert Objekt einer temporären Datei void
__construct() Konstruktor bool
basePath() Returns base path for file string
getData() Gibt Inhalt von "data" zurück array
delete() Löscht Datei in Dateisystem bool
rename() Datei umbenennen bool
exists() Prüft ob Datei existiert bool
getModificationTime() Return file upload time in file system int
getFilename() Dateiname string
getFilepath() Dateipfad string
getFullpath() Dateipfad + Dateiname string
getExtension() Erweiterung string
getFilesize() Dateigröße int
getContent() Dateiinhalt string
getFileHash() File SHA256 hash string
setFilename() Dateiname setzen mixed
setContent() Dateiinhalt setzen mixed
escapeFileName() Bereinigt Dateiname von problematischen Zeichen mixed
moveUploadedFile() Verschiebt via PHP Upload hochgeladene Datei von tmp-Pfad nach Zielpfad bool
loadContent() Lädt Inhalt von gespeicherter Datei bool
writeContent() Lädt Inhalt von gespeicherter Datei bool
isWritable() ist Datei beschreibbar bool
isReadable() ist Datei lesbar bool
isValidDataFolder() Check if fullpath is valid path in /data folder structure bool
realpathNoExists() "realpath" wrapper for non-existing files string
retrieveFileExtension() Retrieve file extension via pathinfo string

Constants

FPCM_LOGFILETYPE_SYSTEM

Systemlog

mixed $FPCM_LOGFILETYPE_SYSTEM = 1

FPCM_LOGFILETYPE_PHP

Error-Log

mixed $FPCM_LOGFILETYPE_PHP = 2

FPCM_LOGFILETYPE_SQL

SQl-Log

mixed $FPCM_LOGFILETYPE_SQL = 3

FPCM_LOGFILETYPE_PKGMGR

Paket Manager Log

mixed $FPCM_LOGFILETYPE_PKGMGR = 4

FPCM_LOGFILETYPE_CRON

Cronjobs Log

mixed $FPCM_LOGFILETYPE_CRON = 5

FPCM_LOGFILETYPE_EVENTS

Events Log

mixed $FPCM_LOGFILETYPE_EVENTS = 6

Properties

$fileMap

Mapping für Integer-Logtyp auf intere Datei * 1 = Systemlog * 2 = Errorlog * 3 = Sqlog * 4 = Paketmanagerlog * 5 = Cronjobslog * 6 =Eventslogs

protected array $fileMap = []

$table

Tabellen-Name

protected string $table

$filename

Dateiname

protected string $filename

$filepath

Dateispfad

protected string $filepath

$fullpath

Dateipfad inkl. Dateiname

protected string $fullpath

$extension

Dateierweiterung

protected string $extension

$filesize

Dateigröße

protected int $filesize

$content

Dateiinhalt

protected string $content

$data

data-Array für nicht weiter definierte Eigenschaften

protected array $data

$cacheName

Cache name

protected string $cacheName = false

$cacheModule

Cache Modul

protected string $cacheModule = ''

Methods

__construct()

Konstruktor

public __construct( $logFile : int [, $init : bool = true ] ) : bool
Parameters
$logFile : int
$init : bool = true
Return values
bool

basePath()

Returns base path for file

protected basePath( $filename : string ) : string
Parameters
$filename : string

File name

Return values
string

save()

Speichert eine neue temporäre Datei in data/temp/

public save( ) : bool
Return values
bool

clear()

Logdatei leeren

public clear( ) : bool
Return values
bool

fetchData()

Logdatei auslesen

public fetchData( ) : array
Return values
array

init()

Initialisiert Objekt einer temporären Datei

public init( ) : void

__construct()

Konstruktor

public __construct( [ $filename : strong = '' ] ) : bool
Parameters
$filename : strong = ''
Return values
bool

basePath()

Returns base path for file

protected abstract basePath( $filename : string ) : string
Parameters
$filename : string

File name

Tags
abstract
Return values
string

getData()

Gibt Inhalt von "data" zurück

public getData( ) : array
Return values
array

delete()

Löscht Datei in Dateisystem

public delete( ) : bool
Return values
bool

rename()

Datei umbenennen

public rename( $newname : string [, $userid : int = false ] ) : bool
Parameters
$newname : string
$userid : int = false
Return values
bool

exists()

Prüft ob Datei existiert

public exists( ) : bool
Return values
bool

getModificationTime()

Return file upload time in file system

public getModificationTime( ) : int
Return values
int

getFilename()

Dateiname

public getFilename( ) : string
Return values
string

getFilepath()

Dateipfad

public getFilepath( ) : string
Return values
string

getFullpath()

Dateipfad + Dateiname

public getFullpath( ) : string
Return values
string

getExtension()

Erweiterung

public getExtension( ) : string
Return values
string

getFilesize()

Dateigröße

public getFilesize( ) : int
Return values
int

getContent()

Dateiinhalt

public getContent( ) : string
Return values
string

getFileHash()

File SHA256 hash

public getFileHash( ) : string
Tags
since
Return values
string

setFilename()

Dateiname setzen

public setFilename( $filename : string ) : mixed
Parameters
$filename : string
Return values
mixed

setContent()

Dateiinhalt setzen

public setContent( $content : string ) : mixed
Parameters
$content : string
Return values
mixed

escapeFileName()

Bereinigt Dateiname von problematischen Zeichen

public escapeFileName( &$filename : string ) : mixed
Parameters
$filename : string
Return values
mixed

moveUploadedFile()

Verschiebt via PHP Upload hochgeladene Datei von tmp-Pfad nach Zielpfad

public moveUploadedFile( $uploadedPath : string ) : bool
Parameters
$uploadedPath : string
Tags
since
Return values
bool

loadContent()

Lädt Inhalt von gespeicherter Datei

public loadContent( ) : bool
Tags
since
Return values
bool

writeContent()

Lädt Inhalt von gespeicherter Datei

public writeContent( ) : bool
Tags
since
Return values
bool

isWritable()

ist Datei beschreibbar

public isWritable( ) : bool
Tags
since
Return values
bool

isReadable()

ist Datei lesbar

public isReadable( ) : bool
Tags
since
Return values
bool

isValidDataFolder()

Check if fullpath is valid path in /data folder structure

public isValidDataFolder( [ $path : string = '' ] [, $type : string = '/' ] ) : bool
Parameters
$path : string = ''
$type : string = '/'
Tags
since
Return values
bool

realpathNoExists()

"realpath" wrapper for non-existing files

protected realpathNoExists( $path : string ) : string
Parameters
$path : string
Tags
since
see
Return values
string

retrieveFileExtension()

Retrieve file extension via pathinfo

public static retrieveFileExtension( $filename : string ) : string
Parameters
$filename : string
Tags
since
Return values
string

Search results