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<string|int, mixed>
- 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<string|int, mixed>
Methods
__construct()
Constructor
public
__construct(File $file) : mixed
Parameters
- $file : File
add()
Adds already known metadata to the aspect
public
add(array<string|int, mixed> $metaData) : self
Parameters
- $metaData : array<string|int, mixed>
Return values
selfcount()
public
count() : int
Return values
intcurrent()
Gets the current value of iteration
public
current() : mixed
get()
Gets the metadata of a file. If not metadata is loaded yet, the database gets queried
public
get() : array<string|int, mixed>
Return values
array<string|int, mixed>key()
Returns the key of the current iteration
public
key() : string
Return values
stringnext()
Increases the index for iteration
public
next() : void
offsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
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
boolgetMetaDataRepository()
protected
getMetaDataRepository() : MetaDataRepository
Return values
MetaDataRepositoryloadFromRepository()
protected
loadFromRepository() : array<string|int, mixed>