Cloud Spanner Client - Class Proto (1.101.0)

Reference documentation and code samples for the Cloud Spanner Client class Proto.

Represents a value with a data type of proto .

Namespace

Google \ Cloud \ Spanner

Methods

__construct

Parameters
Name
Description
value
string

The proto data, base64-encoded.

protoTypeFqn
string

The fully qualified name of the proto type.

get

Get the proto column as a protobuf Message.

Example:

 $message = $proto->get();
var_dump($message->serializeToJsonString()); 
Returns
Type
Description
T

getValue

getProtoTypeFqn

type

Get the type.

Example:

 echo $proto->type(); 
Returns
Type
Description
int

formatAsString

Format the value as a string.

Example:

 echo $proto->formatAsString(); 
Returns
Type
Description
string

__toString

Format the value as a string.

Returns
Type
Description
string
Design a Mobile Site
View Site in Mobile | Classic
Share by: