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

Players actions (yourgamename.action.php)

Izvor: Board Game Arena
Inačica 440 od 5. siječnja 2013. u 12:12 koju je unio Sourisdudesert (razgovor | doprinosi) (Created page with "=== APP_GameAction class (<gamename>.action.php) === ; function isArg( $argName ) : Is this argument filled ? ; function getArg( $argName, $argType, $mandatory=false, $defaul...")
(razl) ←Starija inačica | vidi trenutačnu inačicu (razl) | Novija inačica→ (razl)
Prijeđi na navigaciju Prijeđi na pretraživanje

APP_GameAction class (<gamename>.action.php)

function isArg( $argName )
Is this argument filled ?
function getArg( $argName, $argType, $mandatory=false, $default=NULL, $argTypeDetails=array(), $bCanFail=false )
Get script argument with the correct type
bCanFail means than a validation failure is possible (user input)
The main argType values are as follows.
define( 'AT_int', 0 );        //  an integer
define( 'AT_posint', 1 );     //  a positive integer 
define( 'AT_float', 2 );      //  a float
define( 'AT_email', 3 );      //  an email  
define( 'AT_url', 4 );        //  a URL
define( 'AT_bool', 5 );       //  1/0/true/false
define( 'AT_enum', 6 );       //  argTypeDetails list the possible values
define( 'AT_alphanum', 7 );   //  only 0-9a-zA-Z_ and space