$db
$db : \nre\models\DatabaseDriver
Database connection
Model to interact with Characters-table.
getCharactersForSeminaryCount(integer $seminaryId, string $charactername = null) : integer
Get count of Characters for a Seminary.
integer | $seminaryId | ID of the Seminary |
string | $charactername | Only get Characters with the given name (optional) |
Count of Characters
getCharactersForSeminary(integer $seminaryId, boolean $onlyWithRole = false) : array
Get Characters for a Seminary.
integer | $seminaryId | ID of the Seminary |
boolean | $onlyWithRole | Only Characters that have at least one role assigned (optional) |
Characters
getCharactersForSeminarySorted(integer $seminaryId, string $sort, string $charactername = '', integer $limit = null, integer $offset) : array
Get Characters for a Seminary sorted and optionally limited.
integer | $seminaryId | ID of the Seminary |
string | $sort | Field to sort by |
string | $charactername | Only get Characters with the given name (optional) |
integer | $limit | Limit amount of Characters (optional) |
integer | $offset | Offset (optional) |
Characters
getCharacterForUserAndSeminary(integer $userId, integer $seminaryId) : array
Get the character of a user for a Seminary.
integer | $userId | ID of the user |
integer | $seminaryId | ID of the Seminary |
Character data
getCharactersWithMostAchievements(integer $seminaryId, $count, boolean $alsoWithDeadline = true) : array
Get Characters with the most amount of Achievements.
integer | $seminaryId | ID of Seminary |
$count | ||
boolean | $alsoWithDeadline | Include Achievements with deadline (optional) |
List of Characters
getSuperiorCharacters(integer $seminaryId, integer $xps, integer $count) : array
Get the superior $count Characters in the ranking.
integer | $seminaryId | ID of Seminary |
integer | $xps | XP-value of Character |
integer | $count | Count of Characters to determine |
List of superior Characters
getInferiorCharacters(integer $seminaryId, $characterId, integer $xps, integer $count) : array
Get the inferior $count Characters in the ranking.
integer | $seminaryId | ID of Seminary |
$characterId | ||
integer | $xps | XP-value of Character |
integer | $count | Count of Characters to determine |
List of inferior Characters
createCharacter(integer $userId, integer $charactertypeId, string $characterName) : integer
Create a new Character.
integer | $userId | User-ID that creates the new character |
integer | $charactertypeId | ID of type of new Character |
string | $characterName | Name for the new Character |
ID of Character