neoncitylights/php-data-url

DataUrlParser

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
see
https://tools.ietf.org/html/rfc2397
license

MIT

Table of Contents

Methods

parse()  : DataUrl
getMediaType()  : MediaType
parseMediaTypeAndBase64()  : MediaType

Methods

getMediaType()

private getMediaType(string $mediaTypeString) : MediaType
Parameters
$mediaTypeString : string
Return values
MediaType

parseMediaTypeAndBase64()

private parseMediaTypeAndBase64(string $content) : MediaType
Parameters
$content : string
Return values
MediaType

        
On this page

Search results