cleanArray example

return $fieldSet;
    }

    private static function parseCustom(DOMElement $element, string $fieldName = 'custom'): array
    {
        $elements = $element->getElementsByTagName($fieldName);
        if (!$elements->length) {
            return [];
        }

        return self::cleanArray(self::xmlToArray($elements->item(0)));
    }

    /** * @see https://stackoverflow.com/questions/14553547/what-is-the-best-php-dom-2-array-function */
    private static function xmlToArray(DOMNode $root)
    {
        $result = [];

        if ($root->hasAttributes()) {
            foreach ($root->attributes as $attr) {
                
Home | Imprint | This part of the site doesn't use cookies.