WordPress\AiClient
AiClient::setEventDispatcher
Sets the event dispatcher for prompt lifecycle events.
The event dispatcher will be used to dispatch BeforeGenerateResultEvent and AfterGenerateResultEvent during prompt generation.
Method of the class: AiClient{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = AiClient::setEventDispatcher( ?EventDispatcherInterface $dispatcher ): void;
- ?EventDispatcherInterface $dispatcher(required)
- .
Changelog
| Since 0.4.0 | Introduced. |
AiClient::setEventDispatcher() AiClient::setEventDispatcher code WP 7.0
public static function setEventDispatcher(?EventDispatcherInterface $dispatcher): void
{
self::$eventDispatcher = $dispatcher;
}