DataUrlParser
in package
Provides a data URL parser that is compliant to `RFC 2397`, which defines the data URL scheme.
- If no media type is provided, the default media type is assumed to be
text/plain;charset=US-ASCII
- If a user passes an invalid data URL, the parser will throw an
InvalidDataUrlSyntaxException
Tags
Table of Contents
Methods
- parse() : DataUrl
- getMediaType() : MediaType
- parseMediaTypeAndBase64() : MediaType
Methods
parse()
public
parse(string $dataUrl) : DataUrl
Parameters
- $dataUrl : string
Tags
Return values
DataUrlgetMediaType()
private
getMediaType(string $mediaTypeString) : MediaType
Parameters
- $mediaTypeString : string
Return values
MediaTypeparseMediaTypeAndBase64()
private
parseMediaTypeAndBase64(string $content) : MediaType
Parameters
- $content : string