Messages
in package
Class Messages
Manages error & info messages for the agentic checkout process.
Table of Contents
- $messages : array<string|int, Message>
- Array of messages.
- add() : void
- Add a message.
- get_formatted_messages() : array<string|int, mixed>
- Get all error messages, formatted as per the ACP spec.
- has_errors() : bool
- Check if there are any error messages.
Properties
$messages
Array of messages.
private
array<string|int, Message>
$messages
= array()
Methods
add()
Add a message.
public
add(Message $message) : void
Parameters
- $message : Message
-
The message to add.
Return values
void —get_formatted_messages()
Get all error messages, formatted as per the ACP spec.
public
get_formatted_messages() : array<string|int, mixed>
Return values
array<string|int, mixed> — that is ready for the response.has_errors()
Check if there are any error messages.
public
has_errors() : bool
