Reference documentation and code samples for the Stackdriver Debugger Client class SourceLocation.
Represents a location in the source code.
Example:
use Google\Cloud\Debugger\SourceLocation; $location = new SourceLocation('/path/to/file.php', 10); Namespace
Google \ Cloud \ DebuggerMethods
__construct
Instantiate a new SourceLocation
| Parameters | |
|---|---|
| Name | Description |
path | string Path to the source file within the source context of the target binary. |
line | int Line inside the file. The first line in the file has the value 1. |
path
Returns the path to the source file.
Example:
echo $location->path(); | Returns | |
|---|---|
| Type | Description |
string | |
line
Returns the line inside the file.
Example:
echo $location->line(); | Returns | |
|---|---|
| Type | Description |
int | |
info
Return a serializable version of this object
| Returns | |
|---|---|
| Type | Description |
array | |
static::fromJson
Load a SourceLocation from JSON form
Example:
$location = SourceLocation::fromJSON([ 'path' => '/path/to/file.php', 'line' => 10 ]); | Parameters | |
|---|---|
| Name | Description |
data | array SourceLocation data |
↳ path | string Path to the source file within the source context of the target binary. |
↳ line | int Line inside the file. The first line in the file has the value 1. |