abstract class VolumeFile extends Model implements File

Traits

Properties

int $id
int $volume_id
string $filename
string $uuid

Methods

static int
estimatedCount()

Get an estimated count of all rows from pg_class statistics.

setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')

Set a dynamic JSON attribute.

mixed
getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')

Get a dynamic JSON attribute.

string
getUrlAttribute()

Adds the url attribute to the model. The url is the absolute path to the original file.

string
getUrl()

Get the file URL.

VolumeFile>
volume()

The volume this video belongs to.

setMetadataAttribute(array|null $value)

Set the metadata attribute.

array|null
getMetadataAttribute()

Get the metadata attribute.

setWidthAttribute(int $value)

Set the width attribute.

int|null
getWidthAttribute()

Get the width attribute.

setHeightAttribute(int $value)

Set the height attribute.

int|null
getHeightAttribute()

Get the height attribute.

setSizeAttribute(int $value)

Set the size attribute.

int|null
getSizeAttribute()

Get the size attribute.

string
getMimeTypeAttribute()

Get the mimeType attribute.

setMimeTypeAttribute(string $value)

Set the mimeType attribute.

string
getThumbnailUrlAttribute()

URL to the thumbnail of this file.

VolumeFileLabel, $this>
labels()

The labels, this volume file got attached by the users.

Annotation, $this>
annotations()

The annotations that belong to this file.

Details

in HasEstimatedCount at line 17
static int estimatedCount()

Get an estimated count of all rows from pg_class statistics.

This is much faster than a full table scan of a large table.

Falls back to an exact count if no statistics are available.

See: https://wiki.postgresql.org/wiki/Count_estimate

Return Value

int

in HasJsonAttributes at line 16
protected setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')

Set a dynamic JSON attribute.

Parameters

string $key

Key of the attribute in the JSON.

mixed $value

Value of the attribute in the JSON.

string $attrs

Name of the JSON column of the model.

in HasJsonAttributes at line 38
protected mixed getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')

Get a dynamic JSON attribute.

Parameters

string $key

Key of the attribute in the JSON.

mixed $default

Default value.

string $attrs

Name of the JSON column of the model.

Return Value

mixed

at line 29
string getUrlAttribute()

Adds the url attribute to the model. The url is the absolute path to the original file.

Return Value

string

at line 37
string getUrl()

Get the file URL.

This may be a remote URL starting with "http://" or "https://", or a storage disk path starting with "[disk-name]://".

Return Value

string

at line 47
VolumeFile> volume()

The volume this video belongs to.

Return Value

VolumeFile>

at line 55
setMetadataAttribute(array|null $value)

Set the metadata attribute.

Parameters

array|null $value

at line 63
array|null getMetadataAttribute()

Get the metadata attribute.

Return Value

array|null

at line 73
setWidthAttribute(int $value)

Set the width attribute.

Parameters

int $value

at line 83
int|null getWidthAttribute()

Get the width attribute.

Return Value

int|null

at line 93
setHeightAttribute(int $value)

Set the height attribute.

Parameters

int $value

at line 103
int|null getHeightAttribute()

Get the height attribute.

Return Value

int|null

at line 113
setSizeAttribute(int $value)

Set the size attribute.

Parameters

int $value

at line 123
int|null getSizeAttribute()

Get the size attribute.

Return Value

int|null

at line 133
string getMimeTypeAttribute()

Get the mimeType attribute.

Return Value

string

at line 143
setMimeTypeAttribute(string $value)

Set the mimeType attribute.

Parameters

string $value

at line 153
abstract string getThumbnailUrlAttribute()

URL to the thumbnail of this file.

Return Value

string

at line 160
abstract VolumeFileLabel, $this> labels()

The labels, this volume file got attached by the users.

Return Value

VolumeFileLabel, $this>

at line 167
abstract Annotation, $this> annotations()

The annotations that belong to this file.

Return Value

Annotation, $this>