WordPress\AiClient\Files\ValueObjects

MimeType::__constructpublicWP 0.1.0

Constructor.

Method of the class: MimeType{}

No Hooks.

Returns

null. Nothing (null).

Usage

$MimeType = new MimeType();
$MimeType->__construct( $value );
$value(string) (required)
The MIME type value.

Changelog

Since 0.1.0 Introduced.

MimeType::__construct() code WP 7.0

public function __construct(string $value)
{
    if (!self::isValid($value)) {
        throw new InvalidArgumentException(sprintf('Invalid MIME type: %s', $value));
    }
    $this->value = strtolower($value);
}