share
extends dataset
in
Uses
eventModuleEmpty
Artikel Objekt
Table of Contents
$article_id | ARtciel id | int |
---|---|---|
$sharecount | Share count | int |
$shareitem | Share item string | int |
$lastshare | Timestamp of last share | int |
$dbcon | DB-Verbindung | database |
$id | Objekt-ID | int |
$table | Tabellen-Name | string |
$data | data-Array für nicht weiter definierte Eigenschaften | array |
$dbExcludes | Eigenschaften, welche beim Speichern in DB nicht von getPreparedSaveParams() zurückgegeben werden sollen | array |
$nodata | $this->data beim Speichern nicht berücksichtigen | bool |
$cache | System-Cache | cache |
$session | System-Session | session |
$events | Event-Liste | events |
$config | System-Config-Objekt | config |
$language | System-Sprachen-Objekt | language |
$notifications | Notifications | notifications |
$editAction | Controller-Pfad, wenn Objekt Edit-Action besitzt | string |
$objExists | Objektexistiert | bool |
$cacheName | Cache name | string |
__construct() | Konstruktor | void |
getArticleId() | Returns article id | int |
getSharecount() | Returns share count | int |
getShareitem() | Returns share item string | int |
getLastshare() | Returns last share timestamp | int |
setArticleId() | Set article id | mixed |
setSharecount() | Set share count | mixed |
setShareitem() | Set share item string | mixed |
setLastshare() | Set last share timestamp | mixed |
save() | Save object | bool|int |
update() | Update object | bool |
increase() | Increase share count | bool |
getDescription() | Returns share item description | string |
getIcon() | Returns share item icon | string |
getEventModule() | Returns event base string | string |
__construct() | Konstruktor | void |
__get() | Magic get | mixed |
__set() | Magic set | mixed |
__toString() | Magic string | string |
__call() | Magische Methode für nicht vorhandene Methoden | bool |
__callStatic() | Magische Methode für nicht vorhandene, statische Methoden | bool |
__destruct() | Konstruktor | void |
getData() | Gibt Inhalt von "data" zurück | array |
init() | Inittiert Objekt mit Daten aus der Datenbank, sofern ID vergeben wurde | bool |
getId() | Gibt Object-ID zurück | int |
setId() | Set dataset id | mixed |
exists() | Prüft ob Objekt existiert | bool |
getNodata() | Prüft, ob "data" gespeichert werden soll | bool |
setNodata() | Möglichkeit, "data"-Eigenschaft mit an Datenbank zu senden | mixed |
save() | Executes save process to database and events | bool|int |
update() | Executes update process to database and events | bool|int |
delete() | Löscht ein Objekt in der Datenbank | 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 |
getPreparedValueParams() | Gibt array mit Values für Prepared Statements zurück | int |
prepareDataSave() | Bereitet Daten für Speicherung in Datenbank vor | bool |
getEditLink() | Gibt Link für Edit-Action zurück | string |
getEventName() | Returns full event name string | string |
afterSaveInternal() | Is triggered after successful database insert | bool |
afterUpdateInternal() | Is triggered after successful database update | bool |
Properties
$article_id
ARtciel id
protected
int
$article_id
= ""
$sharecount
Share count
protected
int
$sharecount
= ""
$shareitem
Share item string
protected
int
$shareitem
= ''
$lastshare
Timestamp of last share
protected
int
$lastshare
= ""
$dbcon
DB-Verbindung
protected
database
$dbcon
$id
Objekt-ID
protected
int
$id
$table
Tabellen-Name
protected
string
$table
$data
data-Array für nicht weiter definierte Eigenschaften
protected
array
$data
= []
$dbExcludes
Eigenschaften, welche beim Speichern in DB nicht von getPreparedSaveParams() zurückgegeben werden sollen
protected
array
$dbExcludes
= []
$nodata
$this->data beim Speichern nicht berücksichtigen
protected
bool
$nodata
= true
$cache
System-Cache
protected
cache
$cache
$session
System-Session
protected
session
$session
$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
$editAction
Controller-Pfad, wenn Objekt Edit-Action besitzt
protected
string
$editAction
$objExists
Objektexistiert
protected
bool
$objExists
= false
$cacheName
Cache name
protected
string
$cacheName
= false
Methods
__construct()
Konstruktor
public
__construct(
[ $id :
int
= null ]
)
: void
Parameters
- $id : int = null
getArticleId()
Returns article id
public
getArticleId(
)
: int
Return values
intgetSharecount()
Returns share count
public
getSharecount(
)
: int
Return values
intgetShareitem()
Returns share item string
public
getShareitem(
)
: int
Return values
intgetLastshare()
Returns last share timestamp
public
getLastshare(
)
: int
Return values
intsetArticleId()
Set article id
public
setArticleId(
$articleId :
int
)
: mixed
Parameters
- $articleId : int
Return values
mixedsetSharecount()
Set share count
public
setSharecount(
$sharecount :
int
)
: mixed
Parameters
- $sharecount : int
Return values
mixedsetShareitem()
Set share item string
public
setShareitem(
$shareitem :
int
)
: mixed
Parameters
- $shareitem : int
Return values
mixedsetLastshare()
Set last share timestamp
public
setLastshare(
$lastshare :
int
)
: mixed
Parameters
- $lastshare : int
Return values
mixedsave()
Save object
public
save(
)
: bool|int
Return values
bool|intupdate()
Update object
public
update(
)
: bool
Return values
boolincrease()
Increase share count
public
increase(
)
: bool
Return values
boolgetDescription()
Returns share item description
public
getDescription(
)
: string
Return values
stringgetIcon()
Returns share item icon
public
getIcon(
)
: string
Tags
Return values
stringgetEventModule()
Returns event base string
protected
abstract getEventModule(
)
: string
Tags
Return values
string__construct()
Konstruktor
public
__construct(
[ $id :
int
= null ]
)
: void
Parameters
- $id : int = null
__get()
Magic get
public
__get(
$name :
string
)
: mixed
Parameters
- $name : string
Return values
mixed__set()
Magic set
public
__set(
$name :
mixed
, $value :
mixed
)
: mixed
Parameters
- $name : mixed
- $value : mixed
Return values
mixed__toString()
Magic string
public
__toString(
)
: string
Return values
string__call()
Magische Methode für nicht vorhandene Methoden
public
__call(
$name :
string
, $arguments :
mixed
)
: bool
Parameters
- $name : string
- $arguments : mixed
Return values
bool__callStatic()
Magische Methode für nicht vorhandene, statische Methoden
public
static __callStatic(
$name :
string
, $arguments :
mixed
)
: bool
Parameters
- $name : string
- $arguments : mixed
Return values
bool__destruct()
Konstruktor
public
__destruct(
)
: void
getData()
Gibt Inhalt von "data" zurück
public
getData(
)
: array
Return values
arrayinit()
Inittiert Objekt mit Daten aus der Datenbank, sofern ID vergeben wurde
public
init(
)
: bool
Return values
boolgetId()
Gibt Object-ID zurück
public
getId(
)
: int
Return values
intsetId()
Set dataset id
public
setId(
$id :
int
)
: mixed
Parameters
- $id : int
Return values
mixedexists()
Prüft ob Objekt existiert
public
exists(
)
: bool
Return values
boolgetNodata()
Prüft, ob "data" gespeichert werden soll
public
getNodata(
)
: bool
Return values
boolsetNodata()
Möglichkeit, "data"-Eigenschaft mit an Datenbank zu senden
public
setNodata(
$nodata :
bool
)
: mixed
Parameters
- $nodata : bool
Return values
mixedsave()
Executes save process to database and events
public
save(
)
: bool|int
Tags
Return values
bool|intupdate()
Executes update process to database and events
public
update(
)
: bool|int
Tags
Return values
bool|intdelete()
Löscht ein Objekt in der Datenbank
public
delete(
)
: bool
Return values
boolcreateFromDbObject()
Füllt Objekt mit Daten aus Datenbank-Result
public
createFromDbObject(
$object :
object
)
: bool
Parameters
- $object : object
Return values
boolgetPreparedSaveParams()
Bereitet Eigenschaften des Objects zum Speichern ind er Datenbank vor und entfernt nicht speicherbare Eigenschaften
protected
getPreparedSaveParams(
)
: array
Return values
arraygetPreparedValueParams()
Gibt array mit Values für Prepared Statements zurück
public
getPreparedValueParams(
[ $count :
int
= false ]
)
: int
Parameters
- $count : int = false
Return values
intprepareDataSave()
Bereitet Daten für Speicherung in Datenbank vor
public
prepareDataSave(
)
: bool
Tags
Return values
boolgetEditLink()
Gibt Link für Edit-Action zurück
public
getEditLink(
)
: string
Return values
stringgetEventName()
Returns full event name string
protected
final getEventName(
$event :
string
)
: string
Parameters
- $event : string
Tags
Return values
stringafterSaveInternal()
Is triggered after successful database insert
protected
afterSaveInternal(
)
: bool
Tags
Return values
boolafterUpdateInternal()
Is triggered after successful database update
protected
afterUpdateInternal(
)
: bool