Reference documentation and code samples for the Stackdriver Debugger Client class Variable.
Represents a variable or an argument possibly of a compound object type.
Example:
use Google\Cloud\Debugger\Variable;
$variable = new Variable('myVar', 'string', ['value' => 'some value']);
Methods
__construct
Instantiate a new Variable
Parameters | |
---|---|
Name | Description |
name |
string
Name of the variable, if any. |
type |
string
Variable type (e.g. MyClass). |
options |
array
Variable options |
↳ value |
string
Simple value of the variable. |
↳ varTableIndex |
int
The index of this variable in the variable table. |
↳ members |
Variable[]
Any public member variables. |
↳ status |
Status
Status associated with the variable. |
fromJson
Load a Variable from JSON form
Example:
$variable = Variable::fromJson([
'name' => 'myVar',
'type' => 'string',
'value' => 'some value'
]);
Parameters | |
---|---|
Name | Description |
data |
array
Variable data. |
↳ name |
string
Name of the variable, if any. |
↳ value |
string
Simple value of the variable. |
↳ type |
string
Variable type (e.g. MyClass). |
↳ varTableIndex |
int
The index of this variable in the variable table. |
↳ members |
array
Any public member variables. |
↳ status |
array
Status associated with the variable. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Debugger\Variable |
byteSize
Return the approximate size of this object in bytes
Returns | |
---|---|
Type | Description |
int |
fullByteSize
Returns the approximate size of this object including all members in bytes
Returns | |
---|---|
Type | Description |
int |
info
Return a serializable version of this object
Returns | |
---|---|
Type | Description |
array |