private function getAllLanguages(\DOMXPath $xpath)
    {
        $languages = [];

        foreach ($xpath->query('//*[@language]') as $currentNode) {
            $languages[] = $currentNode->getAttribute('language');
        }

        return array_unique($languages);
    }
private function getAllLanguages(\DOMXPath $xpath)
    {
        $languages = [];

        foreach ($xpath->query('//*[@language]') as $currentNode) {
            $languages[] = $currentNode->getAttribute('language');
        }

        return array_unique($languages);
    }
private function getAllLanguages ( \ DOMXPath $ xpath ) { $ languages = [ ] ; foreach ( $ xpath -> query ( '//*[@language]' ) as $ currentNode ) { $ languages [ ] = $ currentNode -> getAttribute ( 'language' ) ; } return array_unique ( $ languages ) ; }
Parse languages available in the document.

@param \DOMXPath $xpath XPath access to the document parsed.

@return array
Parse languages available in the document .