MetaDataAspect

class \TYPO3\CMS\Core\Resource\MetaDataAspect

Implements
ArrayAccess, Countable, Iterator

Aspect that takes care of a file's metadata

Table of Contents

Interfaces

ArrayAccess
Countable
Iterator

Methods

__construct()  : mixed
Constructor
add()  : self
Adds already known metadata to the aspect
count()  : int
current()  : mixed
Gets the current value of iteration
get()  : array
Gets the metadata of a file. If not metadata is loaded yet, the database gets queried
key()  : string
Returns the key of the current iteration
next()  : void
Increases the index for iteration
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
remove()  : void
Removes a meta data record
rewind()  : void
Resets the internal iterator counter
save()  : void
Creates new or updates existing meta data
valid()  : bool
getMetaDataRepository()  : MetaDataRepository
loadFromRepository()  : array

Methods

__construct()

Constructor

public __construct(File $file) : mixed

Parameters

$file : File

add()

Adds already known metadata to the aspect

public add(array $metaData) : self

Parameters

$metaData : array

Return values

self

count()

public count() : int

Return values

int

current()

Gets the current value of iteration

public current() : mixed

Tags

todo

Set return type to mixed as breaking change in v12 and remove #[\ReturnTypeWillChange].

Attributes

#[ReturnTypeWillChange]

get()

Gets the metadata of a file. If not metadata is loaded yet, the database gets queried

public get() : array

Return values

array

key()

Returns the key of the current iteration

public key() : string

Return values

string

next()

Increases the index for iteration

public next() : void

offsetExists()

public offsetExists(mixed $offset) : bool

Parameters

$offset : mixed

Return values

bool

offsetGet()

public offsetGet(mixed $offset) : mixed

Parameters

$offset : mixed

Tags

todo

Set return type to mixed as breaking change in v12 and remove #[\ReturnTypeWillChange].

Attributes

#[ReturnTypeWillChange]

offsetSet()

public offsetSet(mixed $offset, mixed $value) : void

Parameters

$offset : mixed
$value : mixed

offsetUnset()

public offsetUnset(mixed $offset) : void

Parameters

$offset : mixed

remove()

Removes a meta data record

public remove() : void

rewind()

Resets the internal iterator counter

public rewind() : void

save()

Creates new or updates existing meta data

public save() : void

valid()

public valid() : bool

Return values

bool

loadFromRepository()

protected loadFromRepository() : array

Return values

array
On this page