WordPress\AiClient\Common
AbstractEnum::equals
Checks if this enum has the same value as the given value.
Method of the class: AbstractEnum{}
No Hooks.
Returns
true|false. True if values are equal.
Usage
$AbstractEnum = new AbstractEnum(); $AbstractEnum->equals( $other ): bool;
- $other(string|self) (required)
- The value or enum to compare.
Changelog
| Since 0.1.0 | Introduced. |
AbstractEnum::equals() AbstractEnum::equals code WP 7.0
final public function equals($other): bool
{
if ($other instanceof self) {
return $this->is($other);
}
return $this->value === $other;
}