CodeExplorer getCardFlag example
private function getCardDefinitions(\DOMDocument
$xml): array
{ $cardDefinitions =
[];
foreach ($xml->
getElementsByTagName('card'
) as $index =>
$element) { $cardDefinitions[] =
[ 'title' =>
$this->
getCardTitles($element),
'name' =>
$this->
getCardName($element),
'elements' =>
$this->
getElements($element),
];
if ($this->
getCardFlag($element) !== null
) { $cardDefinitions[$index]['flag'
] =
$this->
getCardFlag($element);
} } return $cardDefinitions;
} private function getCardTitles(\DOMElement
$element): array
{ $titles =
[];
foreach ($element->
getElementsByTagName('title'
) as $title) {