Documentation

LocalizedMessage extends Message
in package

Provides a localized error message that is safe to return to the user which can be attached to an RPC error.

Generated from protobuf message google.rpc.LocalizedMessage

Table of Contents

Properties

$locale  : mixed
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
$message  : mixed
The localized error message in the above locale.

Methods

__construct()  : mixed
Constructor.
getLocale()  : string
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
getMessage()  : string
The localized error message in the above locale.
setLocale()  : $this
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
setMessage()  : $this
The localized error message in the above locale.

Properties

$locale

The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.

protected mixed $locale = ''

Examples are: "en-US", "fr-CH", "es-MX"

Generated from protobuf field string locale = 1 [json_name = "locale"];

$message

The localized error message in the above locale.

protected mixed $message = ''

Generated from protobuf field string message = 2 [json_name = "message"];

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
$data : array<string|int, mixed> = NULL

{ Optional. Data for populating the Message object.

@type string $locale
      The locale used following the specification defined at
      https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
      Examples are: "en-US", "fr-CH", "es-MX"
@type string $message
      The localized error message in the above locale.

}

getLocale()

The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.

public getLocale() : string

Examples are: "en-US", "fr-CH", "es-MX"

Generated from protobuf field string locale = 1 [json_name = "locale"];

Return values
string

getMessage()

The localized error message in the above locale.

public getMessage() : string

Generated from protobuf field string message = 2 [json_name = "message"];

Return values
string

setLocale()

The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.

public setLocale(string $var) : $this

Examples are: "en-US", "fr-CH", "es-MX"

Generated from protobuf field string locale = 1 [json_name = "locale"];

Parameters
$var : string
Return values
$this

setMessage()

The localized error message in the above locale.

public setMessage(string $var) : $this

Generated from protobuf field string message = 2 [json_name = "message"];

Parameters
$var : string
Return values
$this

        
On this page

Search results