FluentDOM\Transformer\JSONx::getType PHP Method

getType() private method

private getType ( DOMElement $node ) : string
$node DOMElement
return string
    private function getType(\DOMElement $node)
    {
        if ($node->hasAttributeNS(self::XMLNS_JSONDOM, 'type')) {
            return $node->getAttributeNS(self::XMLNS_JSONDOM, 'type');
        } else {
            $xpath = new Xpath($node->ownerDocument);
            return $xpath('count(*) > 0', $node) ? 'object' : 'string';
        }
    }