Documentation

tempfile extends file
in package

Temp file object

Tags
author

Stefan Seehafer sea75300@yahoo.de

copyright

(c) 2011-2020, Stefan Seehafer

license

http://www.gnu.org/licenses/gpl.txt GPLv3

Table of Contents

$cache  : cache
Cache-Objekt
$cacheModule  : string
Cache Modul
$cacheName  : string
Cache name
$config  : config
System-Config-Objekt
$content  : string
Dateiinhalt
$data  : array<string|int, mixed>
data-Array für nicht weiter definierte Eigenschaften
$dbcon  : database
DB-Verbindung
$events  : events
Event-Liste
$extension  : string
Dateierweiterung
$filename  : string
Dateiname
$filepath  : string
Dateispfad
$filesize  : int
Dateigröße
$fullpath  : string
Dateipfad inkl. Dateiname
$language  : language
System-Sprachen-Objekt
$notifications  : notifications
Notifications
$table  : string
Tabellen-Name
__construct()  : bool
Konstruktor
delete()  : bool
Löscht Datei in Dateisystem
escapeFileName()  : mixed
Bereinigt Dateiname von problematischen Zeichen
exists()  : bool
Prüft ob Datei existiert
getContent()  : string
Dateiinhalt
getData()  : array<string|int, mixed>
Gibt Inhalt von "data" zurück
getExtension()  : string
Erweiterung
getFileHash()  : string
File SHA256 hash
getFilename()  : string
Dateiname
getFileNameHash()  : string
Return hash based on filename
getFilepath()  : string
Dateipfad
getFilesize()  : int
Dateigröße
getFullpath()  : string
Dateipfad + Dateiname
getModificationTime()  : int
Return file upload time in file system
init()  : void
Initialisiert Objekt einer temporären Datei
isReadable()  : bool
ist Datei lesbar
isValidDataFolder()  : bool
Check if fullpath is valid path in /data folder structure
isWritable()  : bool
ist Datei beschreibbar
loadContent()  : bool
Lädt Inhalt von gespeicherter Datei
moveUploadedFile()  : bool
Verschiebt via PHP Upload hochgeladene Datei von tmp-Pfad nach Zielpfad
rename()  : bool
Datei umbenennen
retrieveFileExtension()  : string
Retrieve file extension via pathinfo
retrieveFileName()  : string
Retrieve file name via pathinfo
retrieveRealType()  : string
Retrieve real file path via finfo
save()  : bool
Speichert eine neue temporäre Datei in data/temp/
setContent()  : mixed
Dateiinhalt setzen
setFilename()  : mixed
Dateiname setzen
writeContent()  : bool
Lädt Inhalt von gespeicherter Datei
basePath()  : string
Returns file data base path
realpathNoExists()  : string
"realpath" wrapper for non-existing files

Properties

$cacheModule

Cache Modul

protected string $cacheModule = ''
Tags
since
3.4

$cacheName

Cache name

protected string $cacheName = false

$content

Dateiinhalt

protected string $content

$data

data-Array für nicht weiter definierte Eigenschaften

protected array<string|int, mixed> $data

$extension

Dateierweiterung

protected string $extension

$filename

Dateiname

protected string $filename

$filepath

Dateispfad

protected string $filepath

$filesize

Dateigröße

protected int $filesize

$fullpath

Dateipfad inkl. Dateiname

protected string $fullpath

$table

Tabellen-Name

protected string $table

Methods

__construct()

Konstruktor

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

delete()

Löscht Datei in Dateisystem

public delete() : bool
Return values
bool

escapeFileName()

Bereinigt Dateiname von problematischen Zeichen

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

exists()

Prüft ob Datei existiert

public exists() : bool
Return values
bool

getContent()

Dateiinhalt

public getContent() : string
Return values
string

getData()

Gibt Inhalt von "data" zurück

public getData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExtension()

Erweiterung

public getExtension() : string
Return values
string

getFileHash()

File SHA256 hash

public getFileHash() : string
Tags
since
4.1
Return values
string

getFilename()

Dateiname

public getFilename() : string
Return values
string

getFileNameHash()

Return hash based on filename

public getFileNameHash() : string
Tags
since
5.0.0-a1
Return values
string

getFilepath()

Dateipfad

public getFilepath() : string
Return values
string

getFilesize()

Dateigröße

public getFilesize() : int
Return values
int

getFullpath()

Dateipfad + Dateiname

public getFullpath() : string
Return values
string

getModificationTime()

Return file upload time in file system

public getModificationTime() : int
Return values
int

init()

Initialisiert Objekt einer temporären Datei

public init() : void
Return values
void

isReadable()

ist Datei lesbar

public isReadable() : bool
Tags
since
3.5
Return values
bool

isValidDataFolder()

Check if fullpath is valid path in /data folder structure

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

isWritable()

ist Datei beschreibbar

public isWritable() : bool
Tags
since
3.5
Return values
bool

loadContent()

Lädt Inhalt von gespeicherter Datei

public loadContent() : bool
Tags
since
3.5
Return values
bool

moveUploadedFile()

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

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

rename()

Datei umbenennen

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

retrieveFileExtension()

Retrieve file extension via pathinfo

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

retrieveFileName()

Retrieve file name via pathinfo

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

retrieveRealType()

Retrieve real file path via finfo

public static retrieveRealType(string $path) : string
Parameters
$path : string
Tags
since
5.0.0-a3
Return values
string

save()

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

public save() : bool
Return values
bool

setContent()

Dateiinhalt setzen

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

setFilename()

Dateiname setzen

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

writeContent()

Lädt Inhalt von gespeicherter Datei

public writeContent() : bool
Tags
since
4.2
Return values
bool

basePath()

Returns file data base path

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

realpathNoExists()

"realpath" wrapper for non-existing files

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

Search results