This is a documentation for Board Game Arena: play board games online !

Table: Розніца паміж версіямі

З пляцоўкі Board Game Arena
Перайсці да навігацыі Перайсці да пошуку
(initial page)
 
Няма тлумачэння праўкі
 
(Не паказана 6 прамежкавых версій таго ж удзельніка)
Радок 1: Радок 1:
This is reference for public and protected method defined in Table and its ancestors, this information obtained by using php reflection.
This is reference for public and protected method defined in Table and its ancestors, this information obtained by using php reflection.


Most of these methods documents on various other wikis, this is just refeference for completeness
Most of these methods documented on various other wikis, this is just refeference for completeness and in case you run into accidental overloading of undocumented functions...
 
<span style="color:red">
Its a long list please help with editing this wiki
</span>
 
 
If you need these method for IDE autocompletion and validation there is unofficial project that has stubs to documented methods:
https://github.com/danielholmes/bga-workbench/tree/master/src/BGAWorkbench/Stubs


== Class hierarchy ==
== Class hierarchy ==
Радок 16: Радок 24:


;Table.getGameName
;Table.getGameName
:part of template, return game name, not to be modified by developer, not document on wiki
;Table._
;Table._
;Table.Table
:translation wrapper function, see [[Translations]]
;Table.setTable
;Table.setTable
:undocumented
;Table.initTable
;Table.initTable
:undocumented
;Table.getAllTableDatas
;Table.getAllTableDatas
:undocumented
;Table.getAllDatas
;Table.getAllDatas
:part of template, override, see [[Main game logic: yourgamename.game.php]]
;Table.setupNewGameTable
;Table.setupNewGameTable
;Table.gameVersionToDbVersion
:undocumented
;Table.setupNewGame
;Table.setupNewGame
:part of template, override, see [[Main game logic: yourgamename.game.php]]
;Table.getTableOptionsForGame
;Table.getTableOptionsForGame
:undocumented
;Table.getTableOptions
;Table.getTableOptions
:undocumented, likely return gameoptions (i.e. variants of the games)
;Table.getTablePreferencesForGame
;Table.getTablePreferencesForGame
:undocumented
;Table.getTablePreferences
;Table.getTablePreferences
:undocumented, likely return UI preferences (i.e. display tooltips or not)
;Table.getGameInfosForGame
;Table.getGameInfosForGame
:undocuments, likely return $gameinfos from gameinfos.inc.php
;Table.getGameOptionsInfos
;Table.getGameOptionsInfos
:undocumented
;Table.start
;Table.start
:undocumented, likely starts the game, do not call
;Table.loadPlayersBasicInfos
;Table.loadPlayersBasicInfos
:very usefull function get players table, see [[Main game logic: yourgamename.game.php]]
;Table.reloadPlayersBasicInfos
;Table.reloadPlayersBasicInfos
:reload players info, see [[Main game logic: yourgamename.game.php]]
;Table.reattributeColorsBasedOnPreferences
;Table.reattributeColorsBasedOnPreferences
:change players colors, see [[Main game logic: yourgamename.game.php]]
;Table.getBestColorFromColorPrefs
;Table.getBestColorFromColorPrefs
:undocumented
;Table.initSetupPlayersInfos
;Table.initSetupPlayersInfos
:undocumented
;Table.getPlayersNumber
;Table.getPlayersNumber
:returns number of players, see [[Main game logic: yourgamename.game.php]]
;Table.checkAction
;Table.checkAction
:check action on server, see [[Main game logic: yourgamename.game.php]]
;Table.checkGameStart
;Table.checkGameStart
;Table.color_to_color_back
;Table.color_to_color_back
:@deprecated, undocumented
;Table.initGameStateLabels
;Table.initGameStateLabels
;Table.setGameStateInitialValue
;Table.setGameStateInitialValue
:Set initial state of global, technically same as setGameStateValue see [[Main_game_logic:_yourgamename.game.php#Use_globals]]
;Table.getGameStateValue
;Table.getGameStateValue
:get value of global see [[Main_game_logic:_yourgamename.game.php#Use_globals]]
;Table.setGameStateValue
;Table.setGameStateValue
:set value of global see [[Main_game_logic:_yourgamename.game.php#Use_globals]]
;Table.incGameStateValue
;Table.incGameStateValue
:increment value of global see [[Main_game_logic:_yourgamename.game.php#Use_globals]]
;Table.is_testmode
;Table.is_testmode
:@deprecated
;Table.testmodedatas
;Table.testmodedatas
:@deprecated
;Table.applyTestModeDbFixture
;Table.applyTestModeDbFixture
;Table.getActivePlayerId
;Table.getActivePlayerId
:get active player id, see [[Main_game_logic:_yourgamename.game.php#Game_states_and_active_players]]
;Table.getActivePlayerName
;Table.getActivePlayerName
:get active player name, see [[Main_game_logic:_yourgamename.game.php#Game_states_and_active_players]]
;Table.getCurrentPlayerId
;Table.getCurrentPlayerId
:get current player id, see [[Main_game_logic:_yourgamename.game.php#Game_states_and_active_players]]
;Table.getCurrentPlayerName
;Table.getCurrentPlayerName
:get currrent player name, see [[Main_game_logic:_yourgamename.game.php#Game_states_and_active_players]]
;Table.getCurrentPlayerColor
;Table.getCurrentPlayerColor
:get current player color, see [[Main_game_logic:_yourgamename.game.php#Game_states_and_active_players]]
;Table.isCurrentPlayerZombie
;Table.isCurrentPlayerZombie
;Table.getPlayerCount
;Table.getPlayerCount
:@deprecated, use getPlayersNumber,
;Table.createNextPlayerTable
;Table.createNextPlayerTable
;Table.getNextPlayerTable
;Table.getNextPlayerTable
Радок 98: Радок 139:
;Table.checkReturnState
;Table.checkReturnState
;Table.sendNotifications
;Table.sendNotifications
;Table.sendNotificationPacket
;Table.getCurrentNotificationNextNo
;Table.getCurrentNotificationNextNo
;Table.getNotificationHistory
;Table.getNotificationHistory
Радок 105: Радок 145:
;Table.eliminatePlayer
;Table.eliminatePlayer
;Table.isAsync
;Table.isAsync
:return true is game is turn based, false if realtime, undocumented (why?)
;Table.getTimeLimits
;Table.getTimeLimits
;Table.getAsyncTimeLimits
;Table.getAsyncTimeLimits
Радок 130: Радок 171:
;APP_DbObject.ConnectDb
;APP_DbObject.ConnectDb
;APP_DbObject.DbQuery
;APP_DbObject.DbQuery
:main query method, see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
;APP_DbObject.DbTraceTimeBefore
;APP_DbObject.DbTraceTimeBefore
;APP_DbObject.DbTraceTimeAfter
;APP_DbObject.DbTraceTimeAfter
Радок 147: Радок 189:
;APP_DbObject.escapeStringForDB
;APP_DbObject.escapeStringForDB
;APP_DbObject.getCollectionFromDB
;APP_DbObject.getCollectionFromDB
:see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
;APP_DbObject.getNonEmptyCollectionFromDB
;APP_DbObject.getNonEmptyCollectionFromDB
;APP_DbObject.getDoubleKeyCollectionFromDB
;APP_DbObject.getDoubleKeyCollectionFromDB
:see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
;APP_DbObject.getUniqueValueFromDB
;APP_DbObject.getUniqueValueFromDB
;APP_DbObject.mysql_fetch_row
;APP_DbObject.mysql_fetch_row
Радок 154: Радок 198:
;APP_DbObject.mysql_query
;APP_DbObject.mysql_query
;APP_DbObject.getObjectFromDB
;APP_DbObject.getObjectFromDB
:see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
;APP_DbObject.getNonEmptyObjectFromDB
;APP_DbObject.getNonEmptyObjectFromDB
:see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
;APP_DbObject.getObjectListFromDB
;APP_DbObject.getObjectListFromDB
:see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
;APP_DbObject.getSelectedDb
;APP_DbObject.getSelectedDb
;APP_DbObject.sqlParsing
;APP_DbObject.sqlParsing

Актуальная версія на 15:41, 17 кастрычніка 2020

This is reference for public and protected method defined in Table and its ancestors, this information obtained by using php reflection.

Most of these methods documented on various other wikis, this is just refeference for completeness and in case you run into accidental overloading of undocumented functions...

Its a long list please help with editing this wiki


If you need these method for IDE autocompletion and validation there is unofficial project that has stubs to documented methods: https://github.com/danielholmes/bga-workbench/tree/master/src/BGAWorkbench/Stubs

Class hierarchy

  • APP_Object
    • APP_DbObject
      • APP_GameClass


Methods in the Table class

Table.getGameName
part of template, return game name, not to be modified by developer, not document on wiki
Table._
translation wrapper function, see Translations
Table.setTable
undocumented
Table.initTable
undocumented
Table.getAllTableDatas
undocumented
Table.getAllDatas
part of template, override, see Main game logic: yourgamename.game.php
Table.setupNewGameTable
undocumented
Table.setupNewGame
part of template, override, see Main game logic: yourgamename.game.php
Table.getTableOptionsForGame
undocumented
Table.getTableOptions
undocumented, likely return gameoptions (i.e. variants of the games)
Table.getTablePreferencesForGame
undocumented
Table.getTablePreferences
undocumented, likely return UI preferences (i.e. display tooltips or not)
Table.getGameInfosForGame
undocuments, likely return $gameinfos from gameinfos.inc.php
Table.getGameOptionsInfos
undocumented
Table.start
undocumented, likely starts the game, do not call
Table.loadPlayersBasicInfos
very usefull function get players table, see Main game logic: yourgamename.game.php
Table.reloadPlayersBasicInfos
reload players info, see Main game logic: yourgamename.game.php
Table.reattributeColorsBasedOnPreferences
change players colors, see Main game logic: yourgamename.game.php
Table.getBestColorFromColorPrefs
undocumented
Table.initSetupPlayersInfos
undocumented
Table.getPlayersNumber
returns number of players, see Main game logic: yourgamename.game.php
Table.checkAction
check action on server, see Main game logic: yourgamename.game.php
Table.checkGameStart
Table.color_to_color_back
@deprecated, undocumented
Table.initGameStateLabels
Table.setGameStateInitialValue
Set initial state of global, technically same as setGameStateValue see Main_game_logic:_yourgamename.game.php#Use_globals
Table.getGameStateValue
get value of global see Main_game_logic:_yourgamename.game.php#Use_globals
Table.setGameStateValue
set value of global see Main_game_logic:_yourgamename.game.php#Use_globals
Table.incGameStateValue
increment value of global see Main_game_logic:_yourgamename.game.php#Use_globals
Table.is_testmode
@deprecated
Table.testmodedatas
@deprecated
Table.applyTestModeDbFixture
Table.getActivePlayerId
get active player id, see Main_game_logic:_yourgamename.game.php#Game_states_and_active_players
Table.getActivePlayerName
get active player name, see Main_game_logic:_yourgamename.game.php#Game_states_and_active_players
Table.getCurrentPlayerId
get current player id, see Main_game_logic:_yourgamename.game.php#Game_states_and_active_players
Table.getCurrentPlayerName
get currrent player name, see Main_game_logic:_yourgamename.game.php#Game_states_and_active_players
Table.getCurrentPlayerColor
get current player color, see Main_game_logic:_yourgamename.game.php#Game_states_and_active_players
Table.isCurrentPlayerZombie
Table.getPlayerCount
@deprecated, use getPlayersNumber,
Table.createNextPlayerTable
Table.getNextPlayerTable
Table.createPrevPlayerTable
Table.getPrevPlayerTable
Table.getPlayerAfter
Table.getPlayerBefore
Table.activeNextPlayer
Table.activePrevPlayer
Table.forceEndOfGame
Table.giveExtraTime
Table.checkZombieTurn
Table.skipPlayersOutOfTime
Table.onPlayerHasBeenZombified
Table.forceAbandon
Table.zombieBack
Table.aiPlayer
Table.aiNotPlaying
Table.aiError
Table.say
Table.getGameProgression
Table.getStatTypesForGame
Table.getStatTypes
Table.stat_type_id_to_name
Table.initStat
Table.getStat
Table.setStat
Table.setStatForAllPlayers
Table.incStat
Table.getStatFromResult
Table.setStatOnResult
Table.setStatOnResultForPlayer
Table.getStandardGameResultObject
Table.getGameRankInfos
Table.argGameEnd
Table.stGameEnd
Table.stTutorialStart
Table.isSoloGame
Table.notifyAllPlayers
Table.notifyPlayer
Table.onEndAjaxAction
Table.checkReturnState
Table.sendNotifications
Table.getCurrentNotificationNextNo
Table.getNotificationHistory
Table.debugChat
Table.timeout
Table.eliminatePlayer
Table.isAsync
return true is game is turn based, false if realtime, undocumented (why?)
Table.getTimeLimits
Table.getAsyncTimeLimits
Table.checkAsyncActivePlayersChange
Table.upgradeTableDb
Table.getReplayPoints
Table.saveReplayPoint
Table.undoAndReplayInit
Table.removeAutoIncrementFromTable
Table.getFieldsListOfTable
Table.undoInit
Table.undoSavepoint
Table.doUndoSavePoint
Table.undoRestorePoint
Table.showTutorial
Table.seenTutorial
Table.activeTutorial
Table.forceGameTournamendEnd
Table.showCursor
APP_GameClass.getNewUnique
APP_GameClass.getNew
APP_GameClass.notifyNow
APP_DbObject.ConnectDb
APP_DbObject.DbQuery
main query method, see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
APP_DbObject.DbTraceTimeBefore
APP_DbObject.DbTraceTimeAfter
APP_DbObject.DbGetLastId
APP_DbObject.DbDumpQueryHistory
APP_DbObject.DbAffectedRow
APP_DbObject.DbStartTransaction
APP_DbObject.DbCommit
APP_DbObject.DbRollback
APP_DbObject.DbRestartTransaction
APP_DbObject.DbSelect
APP_DbObject.CommitAllAndRestart
APP_DbObject.setDeadlockMode
APP_DbObject.isDeadlockModeRetry
APP_DbObject.enableMultiQueries
APP_DbObject.sendMultiQueries
APP_DbObject.escapeStringForDB
APP_DbObject.getCollectionFromDB
see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
APP_DbObject.getNonEmptyCollectionFromDB
APP_DbObject.getDoubleKeyCollectionFromDB
see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
APP_DbObject.getUniqueValueFromDB
APP_DbObject.mysql_fetch_row
APP_DbObject.mysql_fetch_assoc
APP_DbObject.mysql_query
APP_DbObject.getObjectFromDB
see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
APP_DbObject.getNonEmptyObjectFromDB
see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
APP_DbObject.getObjectListFromDB
see https://en.doc.boardgamearena.com/Main_game_logic:_yourgamename.game.php#Accessing_the_database
APP_DbObject.getSelectedDb
APP_DbObject.sqlParsing
APP_DbObject.DbUsePrefix
APP_DbObject.applyPrefix
APP_DbObject.cache_store
APP_DbObject.cache_add
APP_DbObject.cache_exists
APP_DbObject.cache_fetch
APP_DbObject.cache_delete
APP_DbObject.cache_rollback
APP_DbObject.cache_commit
APP_DbObject.ensure_enough_time_since_last_action
APP_DbObject.getMasterNodeDomain
APP_DbObject.getMasterNodeUrl
APP_DbObject.masterNodeRequest
APP_DbObject.gameserverNodeRequest
APP_DbObject.gameserverNodeRequestNoTable
APP_DbObject.bgaCallUrl
APP_Object.watch
APP_Object.debug
APP_Object.trace
APP_Object.warn
APP_Object.error
APP_Object.dump