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
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();
string
line
Returns the line inside the file.
Example:
echo $location->line();
int
info
Return a serializable version of this object
array
static::fromJson
Load a SourceLocation from JSON form
Example:
$location = SourceLocation::fromJSON([
'path' => '/path/to/file.php',
'line' => 10
]);
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.