dbbackup
extends file
in
Image file objekt
Table of Contents
$allowedTypes | Erlaubte Dateitypen | array |
---|---|---|
$allowedExts | Erlaubte Dateiendungen | array |
$mimetype | MIME-Dateityp-Info | string |
$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 |
getFiletime() | Upload-Zeit ausgeben | int |
getMimetype() | MIME-Type ausgeben | int |
save() | Speichert einen neuen Datei-Eintrag in der Datenbank | bool |
update() | Aktualisiert einen Datei-Eintrag in der Datenbank | bool |
rename() | Benennt eine Datei um | bool |
__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 |
Properties
$allowedTypes
Erlaubte Dateitypen
public
static array
$allowedTypes
= ['application/sql', 'text/plain', '', 'application/gzip', 'application/zip']
$allowedExts
Erlaubte Dateiendungen
public
static array
$allowedExts
= ['sql', 'sql.gz', 'sql.zip']
$mimetype
MIME-Dateityp-Info
protected
string
$mimetype
$table
Tabellen-Name
protected
string
$table
$dbcon
DB-Verbindung
protected
database
$dbcon
$cache
Cache-Objekt
protected
cache
$cache
$events
Event-Liste
protected
events
$events
$config
System-Config-Objekt
protected
config
$config
$language
System-Sprachen-Objekt
protected
language
$language
$notifications
Notifications
protected
notifications
$notifications
$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(
[ $filename :
string
= '' ]
)
: bool
Parameters
- $filename : string = ''
Dateiname
Return values
boolbasePath()
Returns base path for file
protected
basePath(
$filename :
string
)
: string
Parameters
- $filename : string
File name
Return values
stringgetFiletime()
Upload-Zeit ausgeben
public
getFiletime(
)
: int
Return values
intgetMimetype()
MIME-Type ausgeben
public
getMimetype(
)
: int
Return values
intsave()
Speichert einen neuen Datei-Eintrag in der Datenbank
public
save(
)
: bool
Return values
boolupdate()
Aktualisiert einen Datei-Eintrag in der Datenbank
public
update(
)
: bool
Return values
boolrename()
Benennt eine Datei um
public
rename(
$newname :
string
[, $userId :
int
= false ]
)
: bool
Parameters
- $newname : string
- $userId : int = false
Return values
bool__construct()
Konstruktor
public
__construct(
[ $filename :
strong
= '' ]
)
: bool
Parameters
- $filename : strong = ''
Return values
boolbasePath()
Returns base path for file
protected
abstract basePath(
$filename :
string
)
: string
Parameters
- $filename : string
File name
Tags
Return values
stringgetData()
Gibt Inhalt von "data" zurück
public
getData(
)
: array
Return values
arraydelete()
Löscht Datei in Dateisystem
public
delete(
)
: bool
Return values
boolrename()
Datei umbenennen
public
rename(
$newname :
string
[, $userid :
int
= false ]
)
: bool
Parameters
- $newname : string
- $userid : int = false
Return values
boolexists()
Prüft ob Datei existiert
public
exists(
)
: bool
Return values
boolgetModificationTime()
Return file upload time in file system
public
getModificationTime(
)
: int
Return values
intgetFilename()
Dateiname
public
getFilename(
)
: string
Return values
stringgetFilepath()
Dateipfad
public
getFilepath(
)
: string
Return values
stringgetFullpath()
Dateipfad + Dateiname
public
getFullpath(
)
: string
Return values
stringgetExtension()
Erweiterung
public
getExtension(
)
: string
Return values
stringgetFilesize()
Dateigröße
public
getFilesize(
)
: int
Return values
intgetContent()
Dateiinhalt
public
getContent(
)
: string
Return values
stringgetFileHash()
File SHA256 hash
public
getFileHash(
)
: string
Tags
Return values
stringsetFilename()
Dateiname setzen
public
setFilename(
$filename :
string
)
: mixed
Parameters
- $filename : string
Return values
mixedsetContent()
Dateiinhalt setzen
public
setContent(
$content :
string
)
: mixed
Parameters
- $content : string
Return values
mixedescapeFileName()
Bereinigt Dateiname von problematischen Zeichen
public
escapeFileName(
&$filename :
string
)
: mixed
Parameters
- $filename : string
Return values
mixedmoveUploadedFile()
Verschiebt via PHP Upload hochgeladene Datei von tmp-Pfad nach Zielpfad
public
moveUploadedFile(
$uploadedPath :
string
)
: bool
Parameters
- $uploadedPath : string
Tags
Return values
boolloadContent()
Lädt Inhalt von gespeicherter Datei
public
loadContent(
)
: bool
Tags
Return values
boolwriteContent()
Lädt Inhalt von gespeicherter Datei
public
writeContent(
)
: bool
Tags
Return values
boolisWritable()
ist Datei beschreibbar
public
isWritable(
)
: bool
Tags
Return values
boolisReadable()
ist Datei lesbar
public
isReadable(
)
: bool
Tags
Return values
boolisValidDataFolder()
Check if fullpath is valid path in /data folder structure
public
isValidDataFolder(
[ $path :
string
= '' ]
[, $type :
string
= '/' ]
)
: bool
Parameters
- $path : string = ''
- $type : string = '/'
Tags
Return values
boolrealpathNoExists()
"realpath" wrapper for non-existing files
protected
realpathNoExists(
$path :
string
)
: string
Parameters
- $path : string
Tags
Return values
stringretrieveFileExtension()
Retrieve file extension via pathinfo
public
static retrieveFileExtension(
$filename :
string
)
: string
Parameters
- $filename : string