WordPress\AiClient\Common

AbstractEnum::isValidValuepublic staticWP 0.1.0

Checks if a value is valid for this enum.

Method of the class: AbstractEnum{}

No Hooks.

Returns

true|false. True if value is valid.

Usage

$result = AbstractEnum::isValidValue( $value ): bool;
$value(string) (required)
The value to check.

Changelog

Since 0.1.0 Introduced.

AbstractEnum::isValidValue() code WP 7.0

final public static function isValidValue(string $value): bool
{
    return in_array($value, self::getValues(), \true);
}