| @@ 409-426 (lines=18) @@ | ||
| 406 | $blocks = []; |
|
| 407 | $attributes = []; |
|
| 408 | ||
| 409 | if ($node->hasAttributes()) { |
|
| 410 | foreach ($node->attributes as $attr) { |
|
| 411 | switch ($attr->name) { |
|
| 412 | case 'id': |
|
| 413 | // Stored Id has following format : id_<zoneId>, so extract <zoneId> |
|
| 414 | $zoneId = substr( |
|
| 415 | $attr->value, |
|
| 416 | strpos($attr->value, '_') + 1 |
|
| 417 | ); |
|
| 418 | break; |
|
| 419 | case 'action': |
|
| 420 | $action = $attr->value; |
|
| 421 | break; |
|
| 422 | default: |
|
| 423 | $attributes[$attr->name] = $attr->value; |
|
| 424 | } |
|
| 425 | } |
|
| 426 | } |
|
| 427 | ||
| 428 | foreach ($node->childNodes as $node) { |
|
| 429 | if ($node->nodeType !== XML_ELEMENT_NODE) { |
|
| @@ 478-495 (lines=18) @@ | ||
| 475 | $action = null; |
|
| 476 | $zoneId = null; |
|
| 477 | ||
| 478 | if ($node->hasAttributes()) { |
|
| 479 | foreach ($node->attributes as $attr) { |
|
| 480 | switch ($attr->name) { |
|
| 481 | case 'id': |
|
| 482 | // Stored Id has following format : id_<blockId>, so extract <blockId> |
|
| 483 | $blockId = substr( |
|
| 484 | $attr->value, |
|
| 485 | strpos($attr->value, '_') + 1 |
|
| 486 | ); |
|
| 487 | break; |
|
| 488 | case 'action': |
|
| 489 | $action = $attr->value; |
|
| 490 | break; |
|
| 491 | default: |
|
| 492 | $attributes[$attr->name] = $attr->value; |
|
| 493 | } |
|
| 494 | } |
|
| 495 | } |
|
| 496 | ||
| 497 | foreach ($node->childNodes as $node) { |
|
| 498 | if ($node->nodeType !== XML_ELEMENT_NODE) { |
|