class ExifMetadataReader extends AbstractMetadataReader

Metadata driven by Exif information.

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.

array
extractFromFile(string|LoaderInterface $file)

Extracts metadata from a file.

array
extractFromData($data)

Extracts metadata from raw data.

array
extractFromStream($resource)

Extracts metadata from a stream.

__construct()

No description

static string
getUnsupportedReason()

Get the reason why this metadata reader is not supported.

static bool
isSupported()

Is this metadata reader supported?

Details

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

See also

MetadataReaderInterface::readFile

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

See also

MetadataReaderInterface::readData

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

See also

MetadataReaderInterface::readStream

at line 70
protected array extractFromFile(string|LoaderInterface $file)

Extracts metadata from a file.

Parameters

string|LoaderInterface $file

Return Value

array An associative array of metadata

See also

AbstractMetadataReader::extractFromFile

at line 86
protected array extractFromData($data)

Extracts metadata from raw data.

Parameters

$data

Return Value

array An associative array of metadata

See also

AbstractMetadataReader::extractFromData

at line 96
protected array extractFromStream($resource)

Extracts metadata from a stream.

Parameters

$resource

Return Value

array An associative array of metadata

See also

AbstractMetadataReader::extractFromStream

at line 27
__construct()

at line 40
static string getUnsupportedReason()

Get the reason why this metadata reader is not supported.

Return Value

string empty string if the reader is available

at line 60
static bool isSupported()

Is this metadata reader supported?

Return Value

bool