SetaPDF_FormFiller_Xfa_Som The helper class working with SOM expressions.

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

Class hierarchy

Summary

Static Methods

escape()

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

Escapes dots in a SOM expression.

Parameters
$som : array|string
 

evaluateSomShortcuts()

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

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()

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

Prepares a SOM expression for further usage.

Parameters
$som : string
 

unescape()

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

Unescapes characters in a SOM expression.

Parameters
$som : array|string
 

Methods

_evaluateDirectMatch()

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

Evaluates a direct match by ignoring invisible/unnamed nodes.

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

_filterNode()

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

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