interface MetadataReaderInterface

Interface that metadata readers must implement.

Methods

readFile(string|LoaderInterface $file)

Reads metadata from a file.

readData(string $data, resource $originalResource = null)

Reads metadata from a binary string.

readStream(resource $resource)

Reads metadata from a stream.

Details

at line 28
MetadataBag readFile(string|LoaderInterface $file)

Reads metadata from a file.

Parameters

string|LoaderInterface $file the path to the file where to read metadata

Return Value

MetadataBag

Exceptions

InvalidArgumentException in case the file does not exist

at line 38
MetadataBag readData(string $data, resource $originalResource = null)

Reads metadata from a binary string.

Parameters

string $data the binary string to read
resource $originalResource an optional resource to gather stream metadata

Return Value

MetadataBag

at line 49
MetadataBag readStream(resource $resource)

Reads metadata from a stream.

Parameters

resource $resource the stream to read

Return Value

MetadataBag

Exceptions

InvalidArgumentException in case the resource is not valid