public function copy(AddressRuleContainer $other) { if ($other->count() == 0 && $this->count() != 0) { $this->removeAll(); } foreach ($other->o as $member) { $this->addObject($member); } }