private static function extract(NodeInterface $node)
    {
        $attributes = [];
        $nodes = [];

        foreach (self::extractProperties($node) as $name => $value) {
            if (is_array($value)) {
                foreach ($value as $item) {
                    if ($item instanceof NodeInterface) {
                        $nodes[$name][] = $item;
                    } else {
                        $attributes[$name][] = $item;
                    }
                }
            } else {
                if ($value instanceof NodeInterface) {
                    $nodes[$name] = $value;
                } else {
                    $attributes[$name] = $value;
                }
            }
        }

        return [$attributes, $nodes];
    }
private static function extract(NodeInterface $node)
    {
        $attributes = [];
        $nodes = [];

        foreach (self::extractProperties($node) as $name => $value) {
            if (is_array($value)) {
                foreach ($value as $item) {
                    if ($item instanceof NodeInterface) {
                        $nodes[$name][] = $item;
                    } else {
                        $attributes[$name][] = $item;
                    }
                }
            } else {
                if ($value instanceof NodeInterface) {
                    $nodes[$name] = $value;
                } else {
                    $attributes[$name] = $value;
                }
            }
        }

        return [$attributes, $nodes];
    }
private static function extract ( NodeInterface $ node ) { $ attributes = [ ] ; $ nodes = [ ] ; foreach ( self :: extractProperties ( $ node ) as $ name => $ value ) { if ( is_array ( $ value ) ) { foreach ( $ value as $ item ) { if ( $ item instanceof NodeInterface ) { $ nodes [ $ name ] [ ] = $ item ; } else { $ attributes [ $ name ] [ ] = $ item ; } } } else { if ( $ value instanceof NodeInterface ) { $ nodes [ $ name ] = $ value ; } else { $ attributes [ $ name ] = $ value ; } } } return [ $ attributes , $ nodes ] ; }
Extracts the properties of the given node.

@param NodeInterface $node The node to use for the extraction.

@return array An array with two indexes: the attributes and the children nodes.
Extracts the properties of the given node .