Stackdriver Debugger Client - Class FormatMessage (1.4.16)

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']);

Methods

__construct

Instantiate a new FormatMessage

Parameters
NameDescription
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.

fromJson

Load a new FormatMessage from JSON form

Example:

$message = FormatMessage::fromJson([
    'format' => 'message with placeholders',
    'parameters' => ['additional parameter']
]);
Parameters
NameDescription
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
TypeDescription
Google\Cloud\Debugger\FormatMessage

info

Return a serializable version of this object

Returns
TypeDescription
array