public function handlesStateFor(SubscriptionGroup $subscriptionGroup) { if ($subscriptionGroup->getMatchType() == $this->getMatchType() || $subscriptionGroup->getMatchType() == "exact") { $sgUri = $subscriptionGroup->getUri(); $sgOptions = $subscriptionGroup->getOptions(); return $this->matcher->isSubGroup($this->getUri(), $this->getOptions(), $sgUri, $sgOptions); } return false; }
/** * @param MatcherInterface $matcher * @return bool */ public function addMatcher(MatcherInterface $matcher) { foreach ($matcher->getMatchTypes() as $matchType) { if (isset($this->matchers[$matchType])) { return false; } } foreach ($matcher->getMatchTypes() as $matchType) { $this->matchers[$matchType] = $matcher; } return true; }