| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 173 lines (6 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Message:: (9 methods):
__construct()
getRole()
getParts()
withPart()
validateParts()
getJsonSchema()
toArray()
fromArray()
__clone()
| __construct(MessageRoleEnum $role, array $parts) X-Ref |
| Constructor. param: MessageRoleEnum $role The role of the message sender. param: MessagePart[] $parts The parts that make up this message. |
| getRole() X-Ref |
| Gets the role of the message sender. return: MessageRoleEnum The role. |
| getParts() X-Ref |
| Gets the message parts. return: MessagePart[] The message parts. |
| withPart(\WordPress\AiClient\Messages\DTO\MessagePart $part) X-Ref |
| Returns a new instance with the given part appended. return: Message A new instance with the part appended. param: MessagePart $part The part to append. |
| validateParts() X-Ref |
| Validates that the message parts are appropriate for the message role. return: void |
| getJsonSchema() X-Ref |
| {@inheritDoc} |
| toArray() X-Ref |
| {@inheritDoc} return: MessageArrayShape |
| fromArray(array $array) X-Ref |
| {@inheritDoc} return: self The specific message class based on the role. |
| __clone() X-Ref |
| Performs a deep clone of the message. This method ensures that message part objects are cloned to prevent modifications to the cloned message from affecting the original. |
| Generated : Sat Jun 13 09:38:55 2026 | Cross-referenced by PHPXref |