Scores
in package
uses
TraitMemberLink
Table of Contents
Properties
- $nUserID : int
- $env : array<string|int, mixed>
- $memberLink : MemberLink
Methods
- __construct() : mixed
- getBox() : string
- Vote-Score-Elemente Wird pro Eintrag eingebunden, der gescort werden darf
- getByUser() : string
- Returns small html list of top ten scorer for another user
- getEntry() : array{nScore: string, strScoreClass: string, nCount: string, bScoreExist: bool}
- Liefert den Score, Anzahl Vote und die css-klasse zum Record
- getMemberLinkInstance() : MemberLink
- getOfMember() : array{id: int, score: int}
- Gibt ID und Score des Users zurück
- getScoreTable() : mixed
- getOutput() : string
- Fills the template
Properties
$nUserID
public
int
$nUserID
$env
private
array<string|int, mixed>
$env
$memberLink
private
MemberLink
$memberLink
Methods
__construct()
public
__construct() : mixed
getBox()
Vote-Score-Elemente Wird pro Eintrag eingebunden, der gescort werden darf
public
getBox(string $strVoteBox, int $nRecordID, int $nOwnerID) : string
Parameters
- $strVoteBox : string
- $nRecordID : int
- $nOwnerID : int
Tags
Return values
stringgetByUser()
Returns small html list of top ten scorer for another user
public
getByUser([string $table = '' ][, int $score = 1 ][, int $userId = 0 ][, bool $get = false ]) : string
Parameters
- $table : string = ''
-
- default 'forum'
- $score : int = 1
-
- if not set, we count -1
- $userId : int = 0
-
- if not set the user_id from session
- $get : bool = false
-
- the points we get (true) or given them (false)
Tags
Return values
stringgetEntry()
Liefert den Score, Anzahl Vote und die css-klasse zum Record
public
getEntry(string $strScoreTable, int $nRecordID) : array{nScore: string, strScoreClass: string, nCount: string, bScoreExist: bool}
Parameters
- $strScoreTable : string
-
- name der tabelle
- $nRecordID : int
-
- record aus dieser tabelle
Tags
Return values
array{nScore: string, strScoreClass: string, nCount: string, bScoreExist: bool}getMemberLinkInstance()
public
getMemberLinkInstance() : MemberLink
Return values
MemberLinkgetOfMember()
Gibt ID und Score des Users zurück
public
getOfMember(mixed $strScoreTable, mixed $nRecordID) : array{id: int, score: int}
Parameters
- $strScoreTable : mixed
-
- Name der Tabelle, für die gevoted wurde (z.b. "forum")
- $nRecordID : mixed
-
- id des records der tabelle
Return values
array{id: int, score: int}getScoreTable()
public
getScoreTable(string $strVoteBox) : mixed
Parameters
- $strVoteBox : string
getOutput()
Fills the template
private
getOutput(array<string|int, mixed> $scorer, array<string|int, mixed> $cnt, string $star) : string
Parameters
- $scorer : array<string|int, mixed>
- $cnt : array<string|int, mixed>
- $star : string