public function set_difference_from($other_project)
{
$this_sets = (array) GP::$translation_set->by_project_id($this->id);
$other_sets = (array) GP::$translation_set->by_project_id($other_project->id);
$added = array();
$removed = array();
foreach ($other_sets as $other_set) {
if (!gp_array_any(array($this, '_compare_set_item'), $this_sets, $other_set)) {
$added[] = $other_set;
}
}
foreach ($this_sets as $this_set) {
if (!gp_array_any(array($this, '_compare_set_item'), $other_sets, $this_set)) {
$removed[] = $this_set;
}
}
return array('added' => $added, 'removed' => $removed);
}