WordPress\AiClient\Operations\DTO
GenerativeAiOperation::__clone
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.
Method of the class: GenerativeAiOperation{}
No Hooks.
Returns
null. Nothing (null).
Usage
$GenerativeAiOperation = new GenerativeAiOperation(); $GenerativeAiOperation->__clone();
Changelog
| Since 0.4.2 | Introduced. |
GenerativeAiOperation::__clone() GenerativeAiOperation:: clone code WP 7.0
public function __clone()
{
// Clone the result if present (GenerativeAiResult has __clone)
if ($this->result !== null) {
$this->result = clone $this->result;
}
// Note: $state is an immutable enum and can be safely shared
}