public function addGroup($group) { if (!in_array($group, $this->groups)) { $this->groups[] = $group; } }