Combu Server  3.1.1
PHP API Documentation
Public Member Functions | Static Public Member Functions | Data Fields
GameMatch Class Reference
Inheritance diagram for GameMatch:
DataClass

Public Member Functions

 __construct ($src=null, $stripSlashes=false)
 
 Save ()
 
 Delete ()
 
 CheckFinished ()
 
 ToArray ()
 
 ToJson ()
 
- Public Member Functions inherited from DataClass
 Save ()
 
 Delete ()
 
 ToJson ()
 
 ToArray ()
 

Static Public Member Functions

static Load ($idTournament=0, $idUser=0, $activeOnly=FALSE, $title="", $customData=array(), $order=NULL, $limit=NULL, $offset=NULL, $count=NULL, $returnArray=FALSE)
 
static Prune ()
 
- Static Public Member Functions inherited from DataClass
static GetTableName ($class)
 
static LoadRecords ($query, $returnedClass="")
 
static CountRecords ($tableName, $filter=null)
 
static TruncateTable ($tableName)
 
static TruncateClass ($class)
 

Data Fields

const TABLE_NAME = "Match"
 
 $Id = 0
 
 $IdTournament = 0
 
 $Title = ""
 
 $DateCreation = NULL
 
 $DateExpire = NULL
 
 $Rounds = 0
 
 $Finished = 0
 

Additional Inherited Members

- Protected Member Functions inherited from DataClass
 _loadFilter ($tableName, $filter)
 
 _loadByRow ($row, $stripSlashes=false, $callbackOnExists=false)
 
 _Delete ($tableName, $filter=null)
 
- Static Protected Member Functions inherited from DataClass
static _count ($tableName, $filter=null)
 
static _load ($tableName, $returnedClass="", $where="", $order=null, $limit=null, $offset=null, &$count=null)
 
static _loadEx ($select, $from, $returnedClass="", $where="", $order=null, $limit=null, $offset=null, &$count=null, $debug=false)
 
static _loadQuery ($query, $returnedClass="")
 

Detailed Description

Class to handle Matches

Author
Skared Creations

Definition at line 10 of file GameMatch.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $src = null,
  $stripSlashes = false 
)

Contructor

Definition at line 25 of file GameMatch.php.

Member Function Documentation

◆ CheckFinished()

CheckFinished ( )

Check if all the scores have been sent

Definition at line 159 of file GameMatch.php.

◆ Delete()

Delete ( )

Delete the record from the database

Returns
boolean Returns TRUE on success

Definition at line 130 of file GameMatch.php.

◆ Load()

static Load (   $idTournament = 0,
  $idUser = 0,
  $activeOnly = FALSE,
  $title = "",
  $customData = array(),
  $order = NULL,
  $limit = NULL,
  $offset = NULL,
  $count = NULL,
  $returnArray = FALSE 
)
static

Load matches corresponding to the filters Database $Database

Parameters
int$idTournamentFilter IdTournament
boolean$activeOnlyLoad only in progress matches, not expired
string$titleFilter Title as REGEXP
array$customDataFilter CustomData (must be an array of associative arrays: [{"key1":"value"},{"key2":"value"}])
string$order
int$limitMax number of results (for paged results)
int$offsetOffset number of results (for paged results)
int$countWill be set to the total count of results
bool$returnArrayIf TRUE then it will return associative arrays else objects
Returns
[]

Definition at line 52 of file GameMatch.php.

◆ Prune()

static Prune ( )
static

Delete all records associated to this class $Database

Definition at line 149 of file GameMatch.php.

◆ Save()

Save ( )

Save the record in the database Database $Database

Returns
boolean Returns TRUE on success

Definition at line 97 of file GameMatch.php.

◆ ToArray()

ToArray ( )

Definition at line 182 of file GameMatch.php.

◆ ToJson()

ToJson ( )

Definition at line 200 of file GameMatch.php.

Field Documentation

◆ $DateCreation

$DateCreation = NULL

Definition at line 17 of file GameMatch.php.

◆ $DateExpire

$DateExpire = NULL

Definition at line 18 of file GameMatch.php.

◆ $Finished

$Finished = 0

Definition at line 20 of file GameMatch.php.

◆ $Id

$Id = 0

Definition at line 14 of file GameMatch.php.

◆ $IdTournament

$IdTournament = 0

Definition at line 15 of file GameMatch.php.

◆ $Rounds

$Rounds = 0

Definition at line 19 of file GameMatch.php.

◆ $Title

$Title = ""

Definition at line 16 of file GameMatch.php.

◆ TABLE_NAME

const TABLE_NAME = "Match"

Definition at line 12 of file GameMatch.php.