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
Internal storage for database table fields
$tableName  : string

Methods

__construct()  : mixed
createMetaDataRecord()  : array
Create empty
findByFile()  : array
Returns array of meta-data properties
findByFileUid()  : array
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
Gets the fields that are available in the table

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$tableFields

Internal storage for database table fields

protected array $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 $additionalFields = [] ]) : array
Parameters
$fileUid : int
$additionalFields : array = []
Return values
array

findByFile()

Returns array of meta-data properties

public findByFile(File $file) : array
Parameters
$file : File
Return values
array

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 $data) : mixed
Parameters
$fileUid : int

the file uid to update

$data : array

Data to update

Internal

getTableFields()

Gets the fields that are available in the table

protected getTableFields() : array
Return values
array
On this page

Search results