diff --git a/src/Element/AbstractElement.php b/src/Element/AbstractElement.php index 7f7d806..25b9e2d 100644 --- a/src/Element/AbstractElement.php +++ b/src/Element/AbstractElement.php @@ -24,23 +24,49 @@ */ abstract class AbstractElement { - // id used to reference object + /** + * @var int|string the id used to reference object + */ public $element_id = 0; - // id used to load args + + /** + * @var int id used to load args + */ public $id = 0; - // name of element + + /** + * @var string the name of element + */ public $name = 'unknown'; - // args passed to during construction + + /** + * @var array|ArgumentArray|null args passed to during construction + */ public $args = []; - // tags used for filtering + + /** + * @var array tags used for filtering + */ public $tags = []; - // render in search result builder + + /** + * @var bool render in search result builder + */ public $search_index = true; - // maximum results of data pulled + + /** + * @var string maximum results of data pulled + */ public $max_results = '240'; - // ancestor public variable updated live + + /** + * @var array ancestor public variable updated live + */ public $ancestors = []; - // inner content updated live + + /** + * @var string inner content updated live + */ public $xml = ''; /** @@ -112,6 +138,7 @@ public function getArgs(): ArgumentArray /** * Get innerText + * * @return string|null */ public function innerText(): ?string diff --git a/src/Engine.php b/src/Engine.php index a64fcfa..225c905 100644 --- a/src/Engine.php +++ b/src/Engine.php @@ -368,7 +368,11 @@ public function getElementArgs(DOMElement $element): ArgumentArray } // get value - $value = $child_node->nodeValue; + $innerHTML = ''; + foreach ($child_node->childNodes as $child) { + $innerHTML .= $element->ownerDocument->saveXML($child); + } + $value = $innerHTML; // get type $type = $child_node->getAttribute('type') ?? 'string';