Normalizes an {@see \SplFileInfo} object to a data URI.
Denormalizes a data URI to a {@see \SplFileObject} object.
- author Kévin Dunglas
CloneableFinalInstantiable
Constants |
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 getSupportedTypes(?string $format) : array |
public normalize(?mixed $object, ?string $format = NULL, array $context = []) : string |
public supportsDenormalization(?mixed $data, string $type, ?string $format = NULL, array $context = []) : bool |
public supportsNormalization(?mixed $data, ?string $format = NULL, array $context = []) : bool |
Constants |
private Symfony |
Properties |
private readonly ?Symfony\Component\Mime\MimeTypeGuesserInterface $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. |