+
+ if ($name == 'ROLES') {
+ // If we get here, we have to recycle both $currentGroupRoles and $currentGroupRoleMap.
+ unset($this->currentGroupRoles);
+ unset($this->currentGroupRoleMap);
+ $this->currentGroupRoles = array();
+ $this->currentGroupRoleMap = array();
+ // Both arrays are now empty.
+ // They will get reconstructed after processing of <role> elements in XML. See below.
+ }
+
+ if ($name == 'ROLE') {
+ // We get here when processing a <role> tag for the current group.
+ // Add new role to $this->currentGroupRoles and a mapping to $this->currentGroupRoleMap.
+ $this->currentGroupRoles[$this->currentElement['ID']] = $this->currentElement;
+ $this->currentElement = array();
+ }