Model
class Model extends CachedModel
A database object (e.g. A player or a team)
Methods
Generates a string with the object's type and ID
Find if the model is in the trash can (or doesn't exist)
Find if the model is active (i.e. visible to everyone)
Get the models's status
Find if two objects represent the same model
Get the possible statuses representing an active model (visible to everyone)
Converts an array of IDs to an array of Models
Gets the type of the model
Gets a human-readable format of the model's type
Escape special HTML characters from a string
Create model objects, given their MySQL entries
Details
at line line 18
__toString()
Generates a string with the object's type and ID
at line line 28
bool
isDeleted()
Find if the model is in the trash can (or doesn't exist)
at line line 42
bool
isActive()
Find if the model is active (i.e. visible to everyone)
at line line 52
string
getStatus()
Get the models's status
at line line 67
bool
isSameAs(object $model)
Find if two objects represent the same model
at line line 87
static string[]
getActiveStatuses()
Get the possible statuses representing an active model (visible to everyone)
at line line 97
static Model[]
arrayIdToModel(int[] $idArray)
Converts an array of IDs to an array of Models
at line line 115
static int[]
mapToIDs(ModelInterface[] $modelArray)
Converts an array of Models to an array of IDs
All model type information is lost
at line line 151
static string
getType()
Gets the type of the model
at line line 160
static string
getTypeForHumans()
Gets a human-readable format of the model's type
at line line 205
static string
escape(string $string)
Escape special HTML characters from a string
at line line 216
static Model[]
createFromDatabaseResults(array $results)
Create model objects, given their MySQL entries