ImportingFile
class ImportingFile (View source)
Represents a file being imported.
Properties
protected File | $fileService | ||
protected Mime | $mimeService | ||
protected ImagineInterface | $imagine | ||
protected BitmapFormat | $bitmapFormat | ||
private string | $localFilename | The full path to the local file being imported. |
|
private string | $concreteFilename | The name of the file for concrete5. |
|
private string|null | $concreteFilenameSanitized | The sanitized name of the file for concrete5. |
|
private string|null | $fileExtension | The extension of the file. |
|
private string|null | $mimeType | The mime type of the file. |
|
private Type|null | $fileType | The type of the file. |
|
private ImageInterface|false|null | $image | The image loaded from the current local file. |
|
private array | $customData | Custom data stored by processors for inter-processors communication. |
Methods
Initialize the instance.
No description
Get the full path to the local file being imported.
Get the name of the file for concrete5.
Get the sanitized name of the file for concrete5.
Get the extension of the file (lower case, without leading dots).
Get the MIME type of the file (starting from the sanitized file extension).
Get the type of the file.
Set custom data for inter-processors communication.
Load the image from the local file.
Save the loaded image to the local file.
Unload the loaded Image instance.
Get custom data for inter-processors communication.
Remove a value stored in the custom data.
Details
__construct(File $fileService, Mime $mimeService, ImagineInterface $imagine, BitmapFormat $bitmapFormat, string $localFilename, string $concreteFilename = '')
Initialize the instance.
$this
changeConcreteFilename(string $newConcreteFilename)
No description
string
getLocalFilename()
Get the full path to the local file being imported.
string
getConcreteFilename()
Get the name of the file for concrete5.
string
getConcreteFilenameSanitized()
Get the sanitized name of the file for concrete5.
string
getFileExtension()
Get the extension of the file (lower case, without leading dots).
string
getMimeType()
Get the MIME type of the file (starting from the sanitized file extension).
Type
getFileType()
Get the type of the file.
$this
setCustomData(string $key, mixed $value)
Set custom data for inter-processors communication.
ImageInterface|null
getImage()
Load the image from the local file.
saveImage()
Save the loaded image to the local file.
releaseImage()
Unload the loaded Image instance.
mixed
getCustomData(string $key, mixed $onNotFound = null)
Get custom data for inter-processors communication.
$this
resetCustomData(string $key)
Remove a value stored in the custom data.