protected function type(\DOMNode $node)
    {
        $type = null;
        if ($node instanceof \DOMText) {
            $type = WordType::TEXT;
        } elseif ($node instanceof \DOMAttr) {
            $type = WordType::VALUE;
        } else {
            throw new ParserCrawlerAfterListenerException('No word type set for this kind of node.');
        }
        return $type;
    }
protected function type(\DOMNode $node)
    {
        $type = null;
        if ($node instanceof \DOMText) {
            $type = WordType::TEXT;
        } elseif ($node instanceof \DOMAttr) {
            $type = WordType::VALUE;
        } else {
            throw new ParserCrawlerAfterListenerException('No word type set for this kind of node.');
        }
        return $type;
    }
protected function type ( \ DOMNode $ node ) { $ type = null ; if ( $ node instanceof \ DOMText ) { $ type = WordType :: TEXT ; } elseif ( $ node instanceof \ DOMAttr ) { $ type = WordType :: VALUE ; } else { throw new ParserCrawlerAfterListenerException ( 'No word type set for this kind of node.' ) ; } return $ type ; }
Get the type of the word given by this kind of node

@param \DOMNode $node
@return string

@throws ParserCrawlerAfterListenerException
Get the type of the word given by this kind of node