Reference documentation and code samples for the Stackdriver Debugger Client class FormatMessage.
Represents a message with parameters.
Example:
use Google\Cloud\Debugger\FormatMessage;
$message = new FormatMessage('message with placeholders', ['additional parameter']);
Namespace
Google \ Cloud \ DebuggerMethods
__construct
Instantiate a new FormatMessage
Parameters | |
---|---|
Name | Description |
format |
string
Format template for the message. The format uses placeholders $0, $1, etc. to reference parameters. $$ can be used to denote the $ character. |
parameters |
string[]
Optional parameters to be embedded into the message. |
info
Return a serializable version of this object
Returns | |
---|---|
Type | Description |
array |
static::fromJson
Load a new FormatMessage from JSON form
Example:
$message = FormatMessage::fromJson([
'format' => 'message with placeholders',
'parameters' => ['additional parameter']
]);
Parameters | |
---|---|
Name | Description |
data |
array
FormatMessage params |
↳ format |
string
Format template for the message. The format uses placeholders $0, $1, etc. to reference parameters. $$ can be used to denote the $ character. |
↳ parameters |
string[]
Optional parameters to be embedded into the message. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Debugger\FormatMessage |