MimeType::__construct( string $value )

In this article

Constructor.

Parameters

$valuestringrequired
The MIME type value.

Source

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

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.