Combu Server  3.1.1
PHP API Documentation
Public Member Functions | Static Public Member Functions | Data Fields
Tournament Class Reference
Inheritance diagram for Tournament:
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 ($finished=FALSE, $title=NULL, $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 = "Tournament"
 
 $Id = 0
 
 $IdOwner = 0
 
 $Title = ""
 
 $DateCreation = NULL
 
 $DateFinished = NULL
 
 $CustomData = ""
 
 $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 Tournaments

Author
Skared Creations

Definition at line 10 of file Tournament.php.

Constructor & Destructor Documentation

◆ __construct()

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

Contructor

Definition at line 25 of file Tournament.php.

Member Function Documentation

◆ CheckFinished()

CheckFinished ( )

Check if all the matches are finished

Definition at line 145 of file Tournament.php.

◆ Delete()

Delete ( )

Delete the record from the database

Returns
boolean Returns TRUE on success

Definition at line 117 of file Tournament.php.

◆ Load()

static Load (   $finished = FALSE,
  $title = NULL,
  $customData = array(),
  $order = NULL,
  $limit = NULL,
  $offset = NULL,
  $count = NULL,
  $returnArray = FALSE 
)
static

Load matches corresponding to the filters Database $Database

Parameters
boolean$finishedFilter Finished
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 51 of file Tournament.php.

◆ Prune()

static Prune ( )
static

Delete all records associated to this class $Database

Definition at line 136 of file Tournament.php.

◆ Save()

Save ( )

Save the record in the database Database $Database

Returns
boolean Returns TRUE on success

Definition at line 86 of file Tournament.php.

◆ ToArray()

ToArray ( )

Definition at line 160 of file Tournament.php.

◆ ToJson()

ToJson ( )

Definition at line 183 of file Tournament.php.

Field Documentation

◆ $CustomData

$CustomData = ""

Definition at line 19 of file Tournament.php.

◆ $DateCreation

$DateCreation = NULL

Definition at line 17 of file Tournament.php.

◆ $DateFinished

$DateFinished = NULL

Definition at line 18 of file Tournament.php.

◆ $Finished

$Finished = 0

Definition at line 20 of file Tournament.php.

◆ $Id

$Id = 0

Definition at line 14 of file Tournament.php.

◆ $IdOwner

$IdOwner = 0

Definition at line 15 of file Tournament.php.

◆ $Title

$Title = ""

Definition at line 16 of file Tournament.php.

◆ TABLE_NAME

const TABLE_NAME = "Tournament"

Definition at line 12 of file Tournament.php.