WordPress\AiClient

AiClient::setEventDispatcherpublic staticWP 0.4.0

Sets the event dispatcher for prompt lifecycle events.

The event dispatcher will be used to dispatch BeforeGenerateResultEvent and AfterGenerateResultEvent during prompt generation.

Метод класса: AiClient{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = AiClient::setEventDispatcher( ?EventDispatcherInterface $dispatcher ): void;
?EventDispatcherInterface $dispatcher(обязательный)
.

Список изменений

С версии 0.4.0 Введена.

Код AiClient::setEventDispatcher() WP 7.0

public static function setEventDispatcher(?EventDispatcherInterface $dispatcher): void
{
    self::$eventDispatcher = $dispatcher;
}