Client request parameters. Used in both slave server <-> cache server and game client <-> slave server communication.

Constructor

new (p:Dynamic)

Creates a new instance.

Parameters:

p

Anonymous object containing the parameters.

Fields

params:Dynamic

Request parameters anonymous object in case you need direct access to it. You shouldn't need to but sometimes it happens.

Methods

inline get (key:String):Dynamic

Returns a request parameter without any additional checks. Avoid using if possible.

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns null if value does not exist.

getArray (key:String):Array<Dynamic>

Returns a request parameter. Will try to cast the value to Array<Dynamic>.

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns false if value does not exist.

getBool (key:String):Bool

Returns a request parameter. Will try to cast the value to Bool.

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns false if value does not exist.

getFloat (key:String):Float

Returns a request parameter. Will try to cast the value to Float.

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns 0.0 if value does not exist.

getFloatParse (key:String):Float

Returns a request parameter. Will try to convert the value to Float with Std.parseFloat().

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns 0.0 if value does not exist.

getInt (key:String):Int

Returns a request parameter. Will try to convert the value to Int with Std.parseInt().

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns 0 if value does not exist.

getList (key:String):List<Dynamic>

Returns a request parameter. Will try to cast the value to List<Dynamic>.

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns false if value does not exist.

getString (key:String):String

Returns a request parameter. Will try to cast the value to String.

Parameters:

key

Parameter name.

Returns:

Parameter value. Returns null if value does not exist.

inline has (key:String):Dynamic

Returns true if the request parameter with this name exists.

Parameters:

key

Parameter name.

Returns:

Returns true if the value exist. False otherwise.