WordPress\AiClient\Providers\Models\DTO

SupportedOption::__constructpublicWP 0.1.0

Constructor.

Method of the class: SupportedOption{}

No Hooks.

Returns

null. Nothing (null).

Usage

$SupportedOption = new SupportedOption();
$SupportedOption->__construct( $name, ?array $supportedValues );
$name(OptionEnum) (required)
The option name.
?array $supportedValues
.
Default: null

Changelog

Since 0.1.0 Introduced.

SupportedOption::__construct() code WP 7.0

public function __construct(OptionEnum $name, ?array $supportedValues = null)
{
    if ($supportedValues !== null && !array_is_list($supportedValues)) {
        throw new InvalidArgumentException('Supported values must be a list array.');
    }
    $this->name = $name;
    $this->supportedValues = $supportedValues;
}