authorImage
extends image
in
Author image file objekt
Table of Contents
$allowedTypes | Erlaubte Dateitypen | array |
---|---|---|
$allowedExts | Erlaubte Dateiendungen | array |
$id | ID von Datei-Eintrag in DB | int |
$width | Bild-Breite | int |
$height | Bild-Höhe | int |
$whstring | String in der Form width="" height="" | string |
$userid | Benutzer-ID des Uploaders | int |
$filetime | Zeitpunkt des Uploads | int |
$alttext | Alternate text | string |
$mimetype | MIME-Dateityp-Info | string |
$iptcStr | Exif/ IPCT data | string |
$isIndexed | Flag if file is in file index | bool |
$dbParams | Felder die in Datenbank gespeichert werden können | 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 |
getImageUrl() | Bild-Url ausgeben | string |
getFileManagerThumbnailUrl() | Dateimanager-Thumbnail ausgeben | string |
getThumbnail() | Thumbnail-Pfad ausgeben | string |
getFileManagerThumbnail() | Dateimanager-Thumbnail-Pfad ausgeben | string |
save() | Speichert einen neuen Datei-Eintrag in der Datenbank | bool |
update() | Aktualisiert einen Datei-Eintrag in der Datenbank | bool |
delete() | Löscht Datei-Eintrag in Datenbank und Datei in Dateisystem | bool |
rename() | Benennt eine Datei um | bool |
exists() | Check if image exists | bool |
createThumbnail() | Erzeugt ein Thumbnail für das aktuelle Bild | bool |
getSaveValues() | Gibt Speicher-Values zurück | array |
init() | initialisiert Bild-Objekt | bool |
createFromDbObject() | Füllt Objekt mit Daten aus Datenbank-Result | bool |
__construct() | Konstruktor | bool |
basePath() | Returns base path for file | string |
getId() | Datensatz-ID | int |
getImageUrl() | Bild-Url ausgeben | string |
getThumbnailUrl() | Thumbnail-Url ausgeben | string |
getFileManagerThumbnailUrl() | Dateimanager-Thumbnail ausgeben | string |
getThumbnail() | Thumbnail-Pfad ausgeben | string |
getThumbnailFull() | kompletten Thumbnail-Pfad ausgeben | string |
getFileManagerThumbnail() | Dateimanager-Thumbnail-Pfad ausgeben | string |
hasFileManageThumbnail() | Checks if file amanager thumbnail exists | bool |
getWidth() | Breite ausgeben | int |
getHeight() | Höhe ausgeben | int |
getWhstring() | String width="" height="" auslesen | string |
getUserid() | Uploader-ID ausgeben | int |
getFiletime() | Upload-Zeit ausgeben | int |
getAltText() | Get alternate text | string |
getMimetype() | MIME-Type ausgeben | int |
getIptcStr() | Returns IPTC credit string | string |
setId() | Datensatz-ID setzen | mixed |
setUserid() | Benutzer-ID setzen | mixed |
setFiletime() | Upload-Zeit setzen | mixed |
setAltText() | Set alternate text | mixed |
save() | Speichert einen neuen Datei-Eintrag in der Datenbank | bool |
update() | Aktualisiert einen Datei-Eintrag in der Datenbank | bool |
delete() | Löscht Datei in Dateisystem | bool |
rename() | Datei umbenennen | bool |
exists() | Prüft ob Datei existiert | bool |
existsFolder() | Prüft, ob Bild nur in Dateisystem existiert | bool |
createThumbnail() | Erzeugt ein Thumbnail für das aktuelle Bild | bool |
getSaveValues() | Gibt Speicher-Values zurück | array |
init() | initialisiert Bild-Objekt | bool |
createFromDbObject() | Füllt Objekt mit Daten aus Datenbank-Result | bool |
getPreparedSaveParams() | Bereitet Eigenschaften des Objects zum Speichern ind er Datenbank vor und entfernt nicht speicherbare Eigenschaften | array |
splitFilename() | Splits filename with possible folder | string |
parseIptc() | reads IPTC data from file | bool |
isValidType() | Check if file extension and file type is valid | bool |
getData() | Gibt Inhalt von "data" zurück | array |
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
= ['image/jpeg', 'image/jpg', 'image/png', 'image/gif']
$allowedExts
Erlaubte Dateiendungen
public
static array
$allowedExts
= ['jpeg', 'jpg', 'png', 'gif']
$id
ID von Datei-Eintrag in DB
protected
int
$id
$width
Bild-Breite
protected
int
$width
$height
Bild-Höhe
protected
int
$height
$whstring
String in der Form width="" height=""
protected
string
$whstring
$userid
Benutzer-ID des Uploaders
protected
int
$userid
$filetime
Zeitpunkt des Uploads
protected
int
$filetime
$alttext
Alternate text
protected
string
$alttext
$mimetype
MIME-Dateityp-Info
protected
string
$mimetype
$iptcStr
Exif/ IPCT data
protected
string
$iptcStr
$isIndexed
Flag if file is in file index
protected
bool
$isIndexed
= false
$dbParams
Felder die in Datenbank gespeichert werden können
protected
array
$dbParams
= ['userid', 'filename', 'filetime', 'filesize', 'alttext']
$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
stringgetImageUrl()
Bild-Url ausgeben
public
getImageUrl(
)
: string
Return values
stringgetFileManagerThumbnailUrl()
Dateimanager-Thumbnail ausgeben
public
getFileManagerThumbnailUrl(
)
: string
Return values
stringgetThumbnail()
Thumbnail-Pfad ausgeben
public
getThumbnail(
)
: string
Return values
stringgetFileManagerThumbnail()
Dateimanager-Thumbnail-Pfad ausgeben
public
getFileManagerThumbnail(
)
: string
Return values
stringsave()
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
booldelete()
Löscht Datei-Eintrag in Datenbank und Datei in Dateisystem
public
delete(
)
: bool
Return values
boolrename()
Benennt eine Datei um
public
rename(
$newname :
string
[, $userId :
int
= false ]
)
: bool
Parameters
- $newname : string
- $userId : int = false
Return values
boolexists()
Check if image exists
public
exists(
[ $dbOnly :
type
= false ]
)
: bool
Parameters
- $dbOnly : type = false
Return values
boolcreateThumbnail()
Erzeugt ein Thumbnail für das aktuelle Bild
public
createThumbnail(
)
: bool
Return values
boolgetSaveValues()
Gibt Speicher-Values zurück
protected
getSaveValues(
)
: array
Return values
arrayinit()
initialisiert Bild-Objekt
protected
init(
$initDB :
bool
)
: bool
Parameters
- $initDB : bool
Return values
boolcreateFromDbObject()
Füllt Objekt mit Daten aus Datenbank-Result
public
createFromDbObject(
$object :
object
)
: bool
Parameters
- $object : object
Tags
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
stringgetId()
Datensatz-ID
public
getId(
)
: int
Return values
intgetImageUrl()
Bild-Url ausgeben
public
getImageUrl(
)
: string
Return values
stringgetThumbnailUrl()
Thumbnail-Url ausgeben
public
getThumbnailUrl(
)
: string
Return values
stringgetFileManagerThumbnailUrl()
Dateimanager-Thumbnail ausgeben
public
getFileManagerThumbnailUrl(
)
: string
Return values
stringgetThumbnail()
Thumbnail-Pfad ausgeben
public
getThumbnail(
)
: string
Return values
stringgetThumbnailFull()
kompletten Thumbnail-Pfad ausgeben
public
getThumbnailFull(
)
: string
Return values
stringgetFileManagerThumbnail()
Dateimanager-Thumbnail-Pfad ausgeben
public
getFileManagerThumbnail(
)
: string
Return values
stringhasFileManageThumbnail()
Checks if file amanager thumbnail exists
public
hasFileManageThumbnail(
)
: bool
Tags
Return values
boolgetWidth()
Breite ausgeben
public
getWidth(
)
: int
Return values
intgetHeight()
Höhe ausgeben
public
getHeight(
)
: int
Return values
intgetWhstring()
String width="" height="" auslesen
public
getWhstring(
)
: string
Return values
stringgetUserid()
Uploader-ID ausgeben
public
getUserid(
)
: int
Return values
intgetFiletime()
Upload-Zeit ausgeben
public
getFiletime(
)
: int
Return values
intgetAltText()
Get alternate text
public
getAltText(
)
: string
Tags
Return values
stringgetMimetype()
MIME-Type ausgeben
public
getMimetype(
)
: int
Return values
intgetIptcStr()
Returns IPTC credit string
public
getIptcStr(
)
: string
Return values
stringsetId()
Datensatz-ID setzen
public
setId(
$id :
int
)
: mixed
Parameters
- $id : int
Return values
mixedsetUserid()
Benutzer-ID setzen
public
setUserid(
$userid :
int
)
: mixed
Parameters
- $userid : int
Return values
mixedsetFiletime()
Upload-Zeit setzen
public
setFiletime(
$filetime :
int
)
: mixed
Parameters
- $filetime : int
Return values
mixedsetAltText()
Set alternate text
public
setAltText(
$alttext :
string
)
: mixed
Parameters
- $alttext : string
@since 4.5
Return values
mixedsave()
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
booldelete()
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
boolexistsFolder()
Prüft, ob Bild nur in Dateisystem existiert
public
existsFolder(
)
: bool
Tags
Return values
boolcreateThumbnail()
Erzeugt ein Thumbnail für das aktuelle Bild
public
createThumbnail(
)
: bool
Return values
boolgetSaveValues()
Gibt Speicher-Values zurück
protected
getSaveValues(
)
: array
Return values
arrayinit()
initialisiert Bild-Objekt
protected
init(
$initDB :
bool
)
: bool
Parameters
- $initDB : bool
Return values
boolcreateFromDbObject()
Füllt Objekt mit Daten aus Datenbank-Result
public
createFromDbObject(
$object :
object
)
: bool
Parameters
- $object : object
Tags
Return values
boolgetPreparedSaveParams()
Bereitet Eigenschaften des Objects zum Speichern ind er Datenbank vor und entfernt nicht speicherbare Eigenschaften
protected
getPreparedSaveParams(
)
: array
Tags
Return values
arraysplitFilename()
Splits filename with possible folder
protected
splitFilename(
$filename :
string
)
: string
Parameters
- $filename : string
Tags
Return values
stringparseIptc()
reads IPTC data from file
public
parseIptc(
$info :
array
)
: bool
Parameters
- $info : array
Tags
Return values
boolisValidType()
Check if file extension and file type is valid
public
static isValidType(
$ext :
string
, $type :
string
[, $map :
array
= [] ]
)
: bool
Parameters
- $ext : string
- $type : string
- $map : array = []
Tags
Return values
boolgetData()
Gibt Inhalt von "data" zurück
public
getData(
)
: array
Return values
arraygetModificationTime()
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