/** * To determine if a container has all the zones from another container. Very useful when looking to compare similar rules. * @param $other * @param $anyIsAcceptable * @return boolean true if Zones from $other are all in this store */ public function includesContainer(AddressRuleContainer $other, $anyIsAcceptable = true) { if (!$anyIsAcceptable) { if ($this->count() == 0 || $other->count() == 0) { return false; } } if ($this->count() == 0) { return true; } if ($other->count() == 0) { return false; } $objects = $other->members(); foreach ($objects as $o) { if (!$this->has($o)) { return false; } } return true; }