SvgTypeCheck
Table of Contents
Constants
-
MIME_TYPES
= ['image/svg', 'image/svg+xml', 'application/svg', 'application/svg+xml']
Properties
-
$fileExtensions
: array<string|int, string>
-
$mimeTypeDetector
: MimeTypeDetector
Methods
-
__construct()
: mixed
-
forFilePath()
: bool
-
forResource()
: bool
-
resolveFileExtensions()
: array<string|int, string>
MIME_TYPES
protected
mixed
MIME_TYPES
= ['image/svg', 'image/svg+xml', 'application/svg', 'application/svg+xml']
$fileExtensions
protected
array<string|int, string>
$fileExtensions
$mimeTypeDetector
protected
MimeTypeDetector
$mimeTypeDetector
__construct()
public
__construct(MimeTypeDetector $mimeTypeDetector) : mixed
Parameters
-
$mimeTypeDetector
: MimeTypeDetector
-
forFilePath()
public
forFilePath(string $filePath) : bool
Parameters
-
$filePath
: string
-
forResource()
public
forResource(FileInterface $file) : bool
Parameters
-
$file
: FileInterface
-
resolveFileExtensions()
protected
resolveFileExtensions() : array<string|int, string>
Return values
array<string|int, string>