+ // Write roles.
+ fwrite($this->file, $this->indentation." <roles>\n");
+ foreach ($roles as $role) {
+ $role_part = $this->indentation.' '."<role id=\"".$this->roleMap[$role['id']]."\"";
+ $role_part .= " name=\"".htmlentities($role['name'])."\"";
+ $role_part .= " description=\"".htmlentities($role['description'])."\"";
+ $role_part .= " rank=\"".$role['rank']."\"";
+ $role_part .= " rights=\"".htmlentities($role['rights'])."\"";
+ $role_part .= " status=\"".$role['status']."\"";
+ $role_part .= "></role>\n";
+ fwrite($this->file, $role_part);
+ }
+ fwrite($this->file, $this->indentation." </roles>\n");
+
+ // Write tasks.
+ fwrite($this->file, $this->indentation." <tasks>\n");
+ foreach ($tasks as $task) {
+ $task_part = $this->indentation.' '."<task id=\"".$this->taskMap[$task['id']]."\"";
+ $task_part .= " name=\"".htmlentities($task['name'])."\"";
+ $task_part .= " description=\"".htmlentities($task['description'])."\"";
+ $task_part .= " status=\"".$task['status']."\"";
+ $task_part .= "></task>\n";
+ fwrite($this->file, $task_part);
+ }
+ fwrite($this->file, $this->indentation." </tasks>\n");
+