DefaultMetadataReader
extends AbstractMetadataReader
in package
A metadata reader that actually doesn't try to extract metadata.
Table of Contents
Methods
- readData() : MetadataBag
- Reads metadata from a binary string.
- readFile() : MetadataBag
- Reads metadata from a file.
- readStream() : MetadataBag
- Reads metadata from a stream.
- extractFromData() : array<string|int, mixed>
- Extracts metadata from raw data.
- extractFromFile() : array<string|int, mixed>
- Extracts metadata from a file.
- extractFromStream() : array<string|int, mixed>
- Extracts metadata from a stream.
- getStreamMetadata() : array<string|int, mixed>
- Gets the URI from a stream resource.
Methods
readData()
Reads metadata from a binary string.
public
readData(mixed $data[, mixed $originalResource = null ]) : MetadataBag
Parameters
- $data : mixed
-
the binary string to read
- $originalResource : mixed = null
-
an optional resource to gather stream metadata
Tags
Return values
MetadataBagreadFile()
Reads metadata from a file.
public
readFile(mixed $file) : MetadataBag
Parameters
- $file : mixed
-
the path to the file where to read metadata
Tags
Return values
MetadataBagreadStream()
Reads metadata from a stream.
public
readStream(mixed $resource) : MetadataBag
Parameters
- $resource : mixed
-
the stream to read
Tags
Return values
MetadataBagextractFromData()
Extracts metadata from raw data.
protected
extractFromData(mixed $data) : array<string|int, mixed>
Parameters
- $data : mixed
Tags
Return values
array<string|int, mixed> —An associative array of metadata
extractFromFile()
Extracts metadata from a file.
protected
extractFromFile(mixed $file) : array<string|int, mixed>
Parameters
- $file : mixed
Tags
Return values
array<string|int, mixed> —An associative array of metadata
extractFromStream()
Extracts metadata from a stream.
protected
extractFromStream(mixed $resource) : array<string|int, mixed>
Parameters
- $resource : mixed
Tags
Return values
array<string|int, mixed> —An associative array of metadata
getStreamMetadata()
Gets the URI from a stream resource.
private
getStreamMetadata(resource|LoaderInterface $resource) : array<string|int, mixed>
Parameters
- $resource : resource|LoaderInterface