Value
extends Message
in package
JSON value.
Generated from protobuf message exprml.v1.Value
Table of Contents
Methods
- __construct() : mixed
- Constructor.
- getArr() : RepeatedField
- arr has an array value if the type is TYPE_ARR.
- getBool() : bool
- bool has a boolean value if the type is TYPE_BOOL.
- getNum() : float
- num has a number value if the type is TYPE_NUM.
- getObj() : MapField
- obj has an object value if the type is TYPE_OBJ.
- getStr() : string
- str has a string value if the type is TYPE_STR.
- getType() : int
- Type of the value.
- setArr() : $this
- arr has an array value if the type is TYPE_ARR.
- setBool() : $this
- bool has a boolean value if the type is TYPE_BOOL.
- setNum() : $this
- num has a number value if the type is TYPE_NUM.
- setObj() : $this
- obj has an object value if the type is TYPE_OBJ.
- setStr() : $this
- str has a string value if the type is TYPE_STR.
- setType() : $this
- Type of the value.
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
- $data : array<string|int, mixed> = NULL
-
{ Optional. Data for populating the Message object.
@type int $type Type of the value. @type bool $bool bool has a boolean value if the type is TYPE_BOOL. @type float $num num has a number value if the type is TYPE_NUM. @type string $str str has a string value if the type is TYPE_STR. @type array<\Exprml\PB\Exprml\V1\Value>|\Google\Protobuf\Internal\RepeatedField $arr arr has an array value if the type is TYPE_ARR. @type array|\Google\Protobuf\Internal\MapField $obj obj has an object value if the type is TYPE_OBJ.
}
getArr()
arr has an array value if the type is TYPE_ARR.
public
getArr() : RepeatedField
Generated from protobuf field repeated .exprml.v1.Value arr = 5 [json_name = "arr"];
Return values
RepeatedFieldgetBool()
bool has a boolean value if the type is TYPE_BOOL.
public
getBool() : bool
Generated from protobuf field bool bool = 2 [json_name = "bool"];
Return values
boolgetNum()
num has a number value if the type is TYPE_NUM.
public
getNum() : float
Generated from protobuf field double num = 3 [json_name = "num"];
Return values
floatgetObj()
obj has an object value if the type is TYPE_OBJ.
public
getObj() : MapField
Generated from protobuf field map<string, .exprml.v1.Value> obj = 6 [json_name = "obj"];
Return values
MapFieldgetStr()
str has a string value if the type is TYPE_STR.
public
getStr() : string
Generated from protobuf field string str = 4 [json_name = "str"];
Return values
stringgetType()
Type of the value.
public
getType() : int
Generated from protobuf field .exprml.v1.Value.Type type = 1 [json_name = "type"];
Return values
intsetArr()
arr has an array value if the type is TYPE_ARR.
public
setArr(array<string|int, Value>|RepeatedField $var) : $this
Generated from protobuf field repeated .exprml.v1.Value arr = 5 [json_name = "arr"];
Parameters
- $var : array<string|int, Value>|RepeatedField
Return values
$thissetBool()
bool has a boolean value if the type is TYPE_BOOL.
public
setBool(bool $var) : $this
Generated from protobuf field bool bool = 2 [json_name = "bool"];
Parameters
- $var : bool
Return values
$thissetNum()
num has a number value if the type is TYPE_NUM.
public
setNum(float $var) : $this
Generated from protobuf field double num = 3 [json_name = "num"];
Parameters
- $var : float
Return values
$thissetObj()
obj has an object value if the type is TYPE_OBJ.
public
setObj(array<string|int, mixed>|MapField $var) : $this
Generated from protobuf field map<string, .exprml.v1.Value> obj = 6 [json_name = "obj"];
Parameters
- $var : array<string|int, mixed>|MapField
Return values
$thissetStr()
str has a string value if the type is TYPE_STR.
public
setStr(string $var) : $this
Generated from protobuf field string str = 4 [json_name = "str"];
Parameters
- $var : string
Return values
$thissetType()
Type of the value.
public
setType(int $var) : $this
Generated from protobuf field .exprml.v1.Value.Type type = 1 [json_name = "type"];
Parameters
- $var : int