Documentation

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
RepeatedField

getBool()

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
bool

getNum()

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
float

getObj()

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
MapField

getStr()

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
string

getType()

Type of the value.

public getType() : int

Generated from protobuf field .exprml.v1.Value.Type type = 1 [json_name = "type"];

Return values
int

setArr()

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
$this

setBool()

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
$this

setNum()

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
$this

setObj()

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
$this

setStr()

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
$this

setType()

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
Return values
$this

        
On this page

Search results