Jinya CMS

File extends Entity
in package
implements JsonSerializable

This class contains information about files stored with the media manager in Jinya CMS

Tags

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

$createdAt  : DateTime
$creatorId  : int
$folderId  : int|null
$id  : int
$lastUpdatedAt  : DateTime
$name  : string
$path  : string
$tags  : array<string|int, string>
$type  : string
$updatedById  : int
create()  : void
Creates the current file
findRootFiles()  : Iterator
Finds all root files
format()  : array<string|int, mixed>
Formats the file into an array
getCreator()  : Artist|null
Gets the creator of this file
getTags()  : Iterator<string|int, FileTag>
Gets all tags for the given file
getUpdatedBy()  : Artist|null
Gets the artist that last updated this file
getUploadChunks()  : Iterator<string|int, UploadingFileChunk>
Gets the uploading chunks
jsonSerialize()  : mixed
setTagsInDatabase()  : void
update()  : void
Updates the current file

Properties

$createdAt

public DateTime $createdAt

The time the file was created at

Tags

$creatorId

public int $creatorId

The ID of the files creator

Tags

$folderId

public int|null $folderId = null

The id of the folder

Tags

$lastUpdatedAt

public DateTime $lastUpdatedAt

The time the file was last updated at

Tags

$name

public string $name

The name of the file

Tags

$path

public string $path = ''

The path where the file is stored, this path is relative to the web root directory

Tags

$tags

public array<string|int, string> $tags = null

The tags of the file

Tags

$type

public string $type = ''

The type of the file

Tags

$updatedById

public int $updatedById

The ID of the artist who last touched the file

Tags

Methods

create()

Creates the current file

public create() : void
Tags
throws
NotNullViolationException
Return values
void

findRootFiles()

Finds all root files

public static findRootFiles() : Iterator
Tags
Return values
Iterator

format()

Formats the file into an array

public format() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

getCreator()

Gets the creator of this file

public getCreator() : Artist|null
Tags
Return values
Artist|null

getTags()

Gets all tags for the given file

public getTags() : Iterator<string|int, FileTag>
Tags
throws
Exception
Return values
Iterator<string|int, FileTag>

getUpdatedBy()

Gets the artist that last updated this file

public getUpdatedBy() : Artist|null
Tags
Return values
Artist|null

jsonSerialize()

public jsonSerialize() : mixed
Tags
Return values
mixed

setTagsInDatabase()

public setTagsInDatabase() : void
Tags
Return values
void

update()

Updates the current file

public update() : void
Tags
throws
NotNullViolationException
Return values
void

Search results