Reader
in package
PHP Exif Reader: Reads EXIF metadata from a file
Tags
Table of Contents
Constants
- INCLUDE_THUMBNAIL = true
- NO_THUMBNAIL = false
- SECTIONS_AS_ARRAYS = true
- SECTIONS_FLAT = false
Properties
- $includeThumbnail : bool
- Include the thumbnail in the EXIF data?
- $iptcMapping : array<string|int, mixed>
- Contains the mapping of names to IPTC field numbers
- $sections : array<string|int, mixed>
- List of EXIF sections
- $sectionsAsArrays : bool
- Parse the sections as arrays?
Methods
- addRequiredSection() : Reader
- Adds an EXIF section to the list
- getExifFromFile() : Exif
- Reads & parses the EXIF data from given file
- getIptcData() : array<string|int, mixed>
- Returns an array of IPTC data
- getRequiredSections() : array<string|int, mixed>
- Getter for the EXIF sections
- setIncludeThumbnail() : Reader
- Define if the thumbnail should be included into the EXIF data or not
- setRequiredSections() : Reader
- Setter for the EXIF sections
Constants
INCLUDE_THUMBNAIL
public
mixed
INCLUDE_THUMBNAIL
= true
NO_THUMBNAIL
public
mixed
NO_THUMBNAIL
= false
SECTIONS_AS_ARRAYS
public
mixed
SECTIONS_AS_ARRAYS
= true
SECTIONS_FLAT
public
mixed
SECTIONS_FLAT
= false
Properties
$includeThumbnail
Include the thumbnail in the EXIF data?
protected
bool
$includeThumbnail
= self::NO_THUMBNAIL
$iptcMapping
Contains the mapping of names to IPTC field numbers
protected
array<string|int, mixed>
$iptcMapping
= array('title' => '2#005', 'keywords' => '2#025', 'copyright' => '2#116', 'caption' => '2#120')
$sections
List of EXIF sections
protected
array<string|int, mixed>
$sections
= array()
$sectionsAsArrays
Parse the sections as arrays?
protected
bool
$sectionsAsArrays
= self::SECTIONS_FLAT
Methods
addRequiredSection()
Adds an EXIF section to the list
public
addRequiredSection(string $section) : Reader
Parameters
- $section : string
Return values
Reader —Current instance for chaining
getExifFromFile()
Reads & parses the EXIF data from given file
public
getExifFromFile(string $file) : Exif
Parameters
- $file : string
Tags
Return values
Exif —Instance of Exif object with data
getIptcData()
Returns an array of IPTC data
public
getIptcData(string $file) : array<string|int, mixed>
Parameters
- $file : string
-
The file to read the IPTC data from
Return values
array<string|int, mixed>getRequiredSections()
Getter for the EXIF sections
public
getRequiredSections() : array<string|int, mixed>
Return values
array<string|int, mixed>setIncludeThumbnail()
Define if the thumbnail should be included into the EXIF data or not
public
setIncludeThumbnail(bool $value) : Reader
Parameters
- $value : bool
Return values
Reader —Current instance for chaining
setRequiredSections()
Setter for the EXIF sections
public
setRequiredSections(array<string|int, mixed> $sections) : Reader
Parameters
- $sections : array<string|int, mixed>
-
List of EXIF sections
Return values
Reader —Current instance for chaining