WordPress\AiClient\Files\ValueObjects
MimeType::equals
Checks if this MIME type equals another.
Method of the class: MimeType{}
No Hooks.
Returns
true|false. True if equal.
Usage
$MimeType = new MimeType(); $MimeType->equals( $other ): bool;
- $other(self|string) (required)
- The other MIME type to compare.
Changelog
| Since 0.1.0 | Introduced. |
MimeType::equals() MimeType::equals code WP 7.0
public function equals($other): bool
{
if ($other instanceof self) {
return $this->value === $other->value;
}
if (is_string($other)) {
return $this->value === strtolower($other);
}
throw new InvalidArgumentException(sprintf('Invalid MIME type comparison: %s', gettype($other)));
}