matchers = $matchers; } public function add(Matcher $matcher) { $this->matchers[] = $matcher; } public function matches(string ...$scopes): bool { foreach ($this->matchers as $m) { if (!$m->matches(...$scopes)) { return false; } } return true; } public function getPrefix(string ...$scopes): string|null|false { if ($this->matches(...$scopes)) { return $this->matches[0]->getPrefix(...$scopes); } return null; } }