\Kaloa\XmpDocument

Provides a read-only interface to an Extensible Metadata Platform (XMP) document.

XMP data can be embedded within a variety of media file formats. For instance, many image editors use XMP to add metadata to image files. This class was originally written to retrieve data from digital photos.

Usage example:

use Kaloa\Xmp\Reader;

$stream = fopen('/path/to/image.jpg', 'rb');
$reader = new Reader();
$xmpDocument = $reader->getXmpDocument($stream);
fclose($stream);
$dcProps = $xmpDocument->getDublinCoreProperties();

printf("Image title(s): %s\n", implode(', ', $dcProps->getTitle()));
printf("Image tags: %s\n", implode(', ', $dcProps->getSubject()));

Summary

Methods
Properties
Constants
__construct()
getDublinCoreProperties()
getExifProperties()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(\DOMDocument  $dom) 

Initializes the instance.

Parameters

\DOMDocument $dom

XMP document

getDublinCoreProperties()

getDublinCoreProperties() : \Kaloa\Xmp\Properties\DublinCoreProperties

Returns Dublin Core (DC) schema properties found in the document.

Returns

\Kaloa\Xmp\Properties\DublinCoreProperties