[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Operations/DTO/ -> GenerativeAiOperation.php (summary)

(no description)

File Size: 150 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

GenerativeAiOperation:: (8 methods):
  __construct()
  __clone()
  getId()
  getState()
  getResult()
  getJsonSchema()
  toArray()
  fromArray()


Class: GenerativeAiOperation  - X-Ref

Represents a long-running generative AI operation.

This DTO tracks the progress of generative AI tasks that may not complete
immediately, providing access to the result once available.

__construct(string $id, OperationStateEnum $state, ?GenerativeAiResult $result = null)   X-Ref
Constructor.

param: string $id Unique identifier for this operation.
param: OperationStateEnum $state The current state of the operation.
param: GenerativeAiResult|null $result The result once the operation completes.

__clone()   X-Ref
Creates a deep clone of this operation.

Clones the result object if present to ensure the cloned
operation is independent of the original.
The state enum is immutable and can be safely shared.


getId()   X-Ref
{@inheritDoc}


getState()   X-Ref
{@inheritDoc}


getResult()   X-Ref
Gets the operation result.

return: GenerativeAiResult|null The result or null if not yet complete.

getJsonSchema()   X-Ref
{@inheritDoc}


toArray()   X-Ref
{@inheritDoc}

return: GenerativeAiOperationArrayShape

fromArray(array $array)   X-Ref
{@inheritDoc}




Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref