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

File: /SetaPDF v2/Core/XmpHelper.php

Class hierarchy

Summary

Properties

$xmlAliases

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

Static Methods

_escapeTagChar()

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

Call back for _encodeTagName()

Parameters
$matches : array
 
See

decodeTagName()

public static SetaPDF_Core_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 SetaPDF_Core_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 SetaPDF_Core_XmpHelper::_findDescription (
string $namespace
): DOMElement

Finds or creates a Description tag with the desired namespace.

Parameters
$namespace : string
 

getPackage()

public SetaPDF_Core_XmpHelper::getPackage (
void
): string

Get the XMP data package.

getXml()

set()

public SetaPDF_Core_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