WordPress\AiClient\Providers\Models\DTO

SupportedOption::__construct │ public │ WP 0.1.0

Constructor.

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

Хуков нет.

Возвращает

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

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

$SupportedOption = new SupportedOption();
$SupportedOption->__construct( $name, ?array $supportedValues );
$name(OptionEnum) (обязательный)
The option name.
?array $supportedValues
.
По умолчанию: null

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

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

Код SupportedOption::__construct() WP 7.1.2

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