WordPress\AiClient\Files\ValueObjects

MimeType::equals │ public │ WP 0.1.0

Checks if this MIME type equals another.

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

Хуков нет.

Возвращает

bool. True if equal.

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

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

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

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

Код MimeType::equals() WP 7.1.2

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