Documentation

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

$date_file_modified

public string|null $date_file_modified

$date_migrated

public string|null $date_migrated

$filename_migrated

public string|null $filename_migrated

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
bool

deleteFile()

Delete a file (not its db record)

public abstract deleteFile() : bool
Return values
bool

getBackend()

Get the name of the backend on which the transform is stored

public getBackend() : FilesBackend
Tags
throws
InvalidArgumentException
Return values
FilesBackend

getBackendName()

Get the name of the backend on which the transform is stored

public getBackendName() : string
Return values
string

getTableName()

public abstract static getTableName() : string
Return values
string

getUrl()

Get an abs url for this transform file

public abstract getUrl() : string
Return values
string
On this page

Search results