FileTrait
Common fields and tooling for file caching and backend info
This includes ensuring support for file backend migration
Table of Contents
Properties
- $backend_migrated : string|null
- $backend_type : string
- $date_file_modified : string|null
- $date_migrated : string|null
- $filename_migrated : string|null
- $filesize : int
- $imagesize : string
Methods
- delete() : bool
- Delete a record, optionally delete the associated file
- deleteFile() : bool
- Delete a file (not its db record)
- getBackend() : FilesBackend
- Get the name of the backend on which the transform is stored
- getBackendName() : string
- Get the name of the backend on which the transform is stored
- getTableName() : string
- getUrl() : string
- Get an abs url for this transform file
Properties
$backend_migrated
public
string|null
$backend_migrated
$backend_type
public
string
$backend_type
$date_file_modified
public
string|null
$date_file_modified
$date_migrated
public
string|null
$date_migrated
$filename_migrated
public
string|null
$filename_migrated
$filesize
public
int
$filesize
$imagesize
public
string
$imagesize
Methods
delete()
Delete a record, optionally delete the associated file
public
delete([bool $remove_file = true ]) : bool
Parameters
- $remove_file : bool = true
-
Flag to delete the file with the record
Return values
booldeleteFile()
Delete a file (not its db record)
public
abstract deleteFile() : bool
Return values
boolgetBackend()
Get the name of the backend on which the transform is stored
public
getBackend() : FilesBackend
Tags
Return values
FilesBackendgetBackendName()
Get the name of the backend on which the transform is stored
public
getBackendName() : string
Return values
stringgetTableName()
public
abstract static getTableName() : string
Return values
stringgetUrl()
Get an abs url for this transform file
public
abstract getUrl() : string