$titles[$this->
getLocaleCodeFromElement($title)] =
$title->nodeValue;
} return $titles;
} private function getElements(\DOMElement
$xml): array
{ $elements =
[];
$count = 0;
/** @var \DOMElement $element */
foreach (static::
getAllChildren($xml) as $element) { $nodeName =
$element->nodeName;
if ($nodeName === 'title' ||
$nodeName === 'name' ||
$nodeName === 'flag'
) { continue;
} $elements[$count] =
$this->
elementToArray($element);
++
$count;
} return $elements;
}