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