SetaPDF_FormFiller_Xfa_Som The helper class working with SOM expressions.

File: /SetaPDF v2/FormFiller/Xfa/Som.php

Class hierarchy

Summary

Static Methods

escape()

public static SetaPDF_FormFiller_Xfa_Som::escape (
array|string $som
): array|mixed

Escapes dots in a SOM expression.

Parameters
$som : array|string
 

evaluateSomShortcuts()

public static SetaPDF_FormFiller_Xfa_Som::evaluateSomShortcuts (
string $som [, string $dataRoot = 'xfa.datasets.data' ]
): array|string

Translates SOM shortcuts in a SOM expression to their full names.

Parameters
$som : string
 
$dataRoot : string

Relative root path

Exceptions

Throws SetaPDF_FormFiller_Exception

prepareSomExpression()

public static SetaPDF_FormFiller_Xfa_Som::prepareSomExpression (
string $som
): array

Prepares a SOM expression for further usage.

Parameters
$som : string
 

unescape()

public static SetaPDF_FormFiller_Xfa_Som::unescape (
array|string $som
): array|string

Unescapes characters in a SOM expression.

Parameters
$som : array|string
 

Methods

_evaluateDirectMatch()

protected SetaPDF_FormFiller_Xfa_Som::_evaluateDirectMatch (
string $name, DOMElement $context, array &$result
): void

Evaluates a direct match by ignoring invisible/unnamed nodes.

Parameters
$name : string
 
$context : DOMElement
 
$result : array
 

_filterNode()

protected SetaPDF_FormFiller_Xfa_Som::_filterNode (
array|DOMNodeList $nodeList, mixed $filter
): array

Filters a node list by given filter values.

Actually only numeric offsets or a wildcard filter are available.

Parameters
$nodeList : array|DOMNodeList
 
$filter : mixed
 
Exceptions

Throws SetaPDF_FormFiller_Exception

evaluate()

Evaluates a SOM expression in the given context and returs the matched node(s).

Parameters
$som : string
 
$context : DOMElement|DOMElement[]
 
Exceptions

Throws Exception