/** * 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(ZoneRuleContainer $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; } $zones = $other->zones(); foreach ($zones as $zone) { if (!$this->hasZone($zone)) { return false; } } return true; }