WordPress\AiClient\Common

AbstractEnum::equals │ public │ WP 0.1.0

Checks if this enum has the same value as the given value.

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

Хуков нет.

Возвращает

bool. True if values are equal.

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

$AbstractEnum = new AbstractEnum();
$AbstractEnum->equals( $other ): bool;
$other(строка|self) (обязательный)
The value or enum to compare.

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

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

Код AbstractEnum::equals() WP 7.1.4

final public function equals($other): bool
{
    if ($other instanceof self) {
        return $this->is($other);
    }
    return $this->value === $other;
}