FluentDOM\Serializer\Json\Rayfish::getAttributes PHP Method

getAttributes() private method

private getAttributes ( DOMElement $node ) : array
$node DOMElement
return array
    private function getAttributes(\DOMElement $node)
    {
        $result = [];
        foreach ($node->attributes as $name => $attributeNode) {
            $attribute = new \stdClass();
            $attribute->{'#name'} = '@' . $attributeNode->name;
            $attribute->{'#text'} = $attributeNode->value;
            $attribute->{'#children'} = [];
            $result[] = $attribute;
        }
        return $result;
    }