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

Public Member Functions

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

Static Public Member Functions

static Load ($idAccount)
 
static LoadAccount ($platformKey, $platformId, &$accountPlatform=NULL)
 
static LoadOrCreateAccount ($platformKey, $platformId, &$accountPlatform=NULL, &$justCreated=FALSE)
 
- 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 = "Account_Platform"
 
 $IdAccount = 0
 
 $PlatformKey = ""
 
 $PlatformId = ""
 

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

Handle the association of Account with Platforms (GameCenter, GooglePlay, Facebook and every other external platforms)

Author
Skared Creations

Definition at line 10 of file Account_Platform.php.

Constructor & Destructor Documentation

◆ __construct()

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

Contructor

Definition at line 21 of file Account_Platform.php.

Member Function Documentation

◆ Delete()

Delete ( )

Delete the record from the database

Returns
boolean Returns TRUE on success

Definition at line 132 of file Account_Platform.php.

◆ Load()

static Load (   $idAccount)
static

Get the registered platform logins Database $Database

Parameters
int$idAccountFilter IdAccount
Returns

Definition at line 36 of file Account_Platform.php.

◆ LoadAccount()

static LoadAccount (   $platformKey,
  $platformId,
$accountPlatform = NULL 
)
static

Definition at line 42 of file Account_Platform.php.

◆ LoadOrCreateAccount()

static LoadOrCreateAccount (   $platformKey,
  $platformId,
$accountPlatform = NULL,
$justCreated = FALSE 
)
static

Load or create an account associated to the platform

Parameters
string$platformKeyThe Platform Key (e.g.: "GameCenter", "GooglePlay", "Facebook", etc.)
string$platformIdThe User Id returned by the Platform authentication
string$customDataThe JSON string representation of an associative array for custom data
\self$accountPlatformIt is set with the loaded or created Account-Platform object Database $Database
Returns
Account

Definition at line 72 of file Account_Platform.php.

◆ Save()

Save ( )

Save the record in the database

Returns
boolean Returns TRUE on success

Definition at line 113 of file Account_Platform.php.

Field Documentation

◆ $IdAccount

$IdAccount = 0

Definition at line 14 of file Account_Platform.php.

◆ $PlatformId

$PlatformId = ""

Definition at line 16 of file Account_Platform.php.

◆ $PlatformKey

$PlatformKey = ""

Definition at line 15 of file Account_Platform.php.

◆ TABLE_NAME

const TABLE_NAME = "Account_Platform"

Definition at line 12 of file Account_Platform.php.