SupportedOption::__construct( WordPressAiClientProvidersModelsEnumsOptionEnum $name, WordPressAiClientProvidersModelsDTOlist|null $supportedValues = null )

In this article

Constructor.

Parameters

$nameWordPressAiClientProvidersModelsEnumsOptionEnumrequired
The option name.
$supportedValues<span class="WordPressAiClientProvidersModelsDTOlist”>WordPressAiClientProvidersModelsDTOlist|nulloptional
The supported values for this option, or null if any value is supported.

Default:null

Source

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;
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.