setasign\SetaPDF2\Core\Xmp

XmpHelper A helper class for an easy lightweight access to XMP data packages

File: /SetaPDF v2/Core/Xmp/XmpHelper.php
Old class name (alias): \SetaPDF_Core_XmpHelper

Class hierarchy

Summary

Properties

$xml

$xmlAliases

public XmpHelper::$xmlAliases = array(...)

Static Methods

_escapeTagChar()

private static XmpHelper::_escapeTagChar (
array $matches
): string

Call back for _encodeTagName()

Parameters
$matches : array
 
See

decodeTagName()

public static XmpHelper::decodeTagName (
string|string[] $encodedTagName
): string|string[]

Decodes a tag name as specified in the XMP Specification Part 3 - 2.2.1

Parameters
$encodedTagName : string|string[]
 

encodeTagName()

public static XmpHelper::encodeTagName (
string|string[] $tagName
): string|string[]

Encodes a tag name as specified in the XMP Specification Part 3 - 2.2.1

Parameters
$tagName : string|string[]
 

Methods

__construct()

The constructor.

Parameters
$xml : \DOMDocument
 

_findDescription()

protected XmpHelper::_findDescription (
string $namespace
): \DOMElement

Finds or creates a Description tag with the desired namespace.

Parameters
$namespace : string
 

getPackage()

public XmpHelper::getPackage (
void
): string

Get the XMP data package.

getXml()

public XmpHelper::getXml (
void
): \DOMDocument

set()

public XmpHelper::set (
string $namespace,
string $tagName,
bool|string|array $value
): void

Updates a single field in the XMP package.

Parameters
$namespace : string

The namespace of the element

$tagName : string

The tag name

$value : bool|string|array

The value