public
|
parseGetElements(array $elementMap = null): array
parseGetElements parses everything in the current sub-tree,
and returns an array of elements.
parseGetElements parses everything in the current sub-tree,
and returns an array of elements.
Each element has a 'name', 'value' and 'attributes' key.
If the element didn't contain sub-elements, an empty array is always
returned. If there was any text inside the element, it will be
discarded.
If the $elementMap argument is specified, the existing elementMap will
be overridden while parsing the tree, and restored after this process.
|
#
|
public
|
parseInnerTree(array $elementMap = null): array|string|null
Parses all elements below the current element.
Parses all elements below the current element.
This method will return a string if this was a text-node, or an array if
there were sub-elements.
If there's both text and sub-elements, the text will be discarded.
If the $elementMap argument is specified, the existing elementMap will
be overridden while parsing the tree, and restored after this process.
|
#
|
public
|
readText(): string
Reads all text below the current element, and returns this as a string.
Reads all text below the current element, and returns this as a string.
|
#
|
public
|
parseAttributes(): array
Grabs all the attributes from the current element, and returns them as a
key-value array.
Grabs all the attributes from the current element, and returns them as a
key-value array.
If the attributes are part of the same namespace, they will simply be
short keys. If they are defined on a different namespace, the attribute
name will be returned in clark-notation.
|
#
|