MetaDataRepository implements SingletonInterface

Repository Class as an abstraction layer to sys_file_metadata

Every access to table sys_file_metadata which is not handled by DataHandler has to use this Repository class

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$eventDispatcher  : EventDispatcherInterface
$tableFields  : array<string|int, mixed>
Internal storage for database table fields
$tableName  : string

Methods

__construct()  : mixed
createMetaDataRecord()  : array<string|int, mixed>
Create empty
findByFile()  : array<string|int, mixed>
Returns array of meta-data properties
findByFileUid()  : array<string|int, mixed>
Retrieves metadata for file
getInstance()  : MetaDataRepository
removeByFileUid()  : mixed
Remove all metadata records for a certain file from the database
update()  : mixed
Updates the metadata record in the database
getTableFields()  : array<string|int, mixed>
Gets the fields that are available in the table

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$tableFields

Internal storage for database table fields

protected array<string|int, mixed> $tableFields = []

$tableName

protected string $tableName = 'sys_file_metadata'

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface

createMetaDataRecord()

Create empty

public createMetaDataRecord(int $fileUid[, array<string|int, mixed> $additionalFields = [] ]) : array<string|int, mixed>
Parameters
$fileUid : int
$additionalFields : array<string|int, mixed> = []
Return values
array<string|int, mixed>

findByFile()

Returns array of meta-data properties

public findByFile(File $file) : array<string|int, mixed>
Parameters
$file : File
Return values
array<string|int, mixed>

findByFileUid()

Retrieves metadata for file

public findByFileUid(int $uid) : array<string|int, mixed>
Parameters
$uid : int
Tags
throws
InvalidUidException
Return values
array<string|int, mixed>

removeByFileUid()

Remove all metadata records for a certain file from the database

public removeByFileUid(int $fileUid) : mixed
Parameters
$fileUid : int

update()

Updates the metadata record in the database

public update(int $fileUid, array<string|int, mixed> $data) : mixed
Parameters
$fileUid : int

the file uid to update

$data : array<string|int, mixed>

Data to update

Internal

getTableFields()

Gets the fields that are available in the table

protected getTableFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results