Copied!

Normalizes an {@see \SplFileInfo} object to a data URI.

Denormalizes a data URI to a {@see \SplFileObject} object.

CloneableInstantiable
Constants
public Symfony\Component\Serializer\Normalizer\DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS = 'collect_denormalization_errors'
Methods
public __construct(?Symfony\Component\Mime\MimeTypeGuesserInterface $mimeTypeGuesser = NULL)
public denormalize(?mixed $data, string $type, ?string $format = NULL, array $context = []) : SplFileInfo
 

Regex adapted from Brian Grinstead code.

public hasCacheableSupportsMethod() : bool
public normalize(?mixed $object, ?string $format = NULL, array $context = []) : string
public supportsDenormalization(?mixed $data, string $type, ?string $format = NULL) : bool
public supportsNormalization(?mixed $data, ?string $format = NULL) : bool
Constants
private Symfony\Component\Serializer\Normalizer\DataUriNormalizer::SUPPORTED_TYPES = ['SplFileInfo' => true, 'SplFileObject' => true, 'Symfony\Component\HttpFoundation\File\File' => true]
Properties
private $mimeTypeGuesser
Methods
private extractSplFileObject(SplFileInfo $object) : SplFileObject
 

Returns the \SplFileObject instance associated with the given \SplFileInfo instance.

private getMimeType(SplFileInfo $object) : string
 

Gets the mime type of the object. Defaults to application/octet-stream.

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration