private function matches(ViewInterface $view, array $matchConfig): bool
    {
        foreach ($matchConfig as $matcher => $matcherConfig) {
            if (!isset($this->matchers[$matcher])) {
                throw TemplateResolverException::noTemplateMatcher($matcher);
            }

            $matcherConfig = !is_array($matcherConfig) ? [$matcherConfig] : $matcherConfig;
            if (!$this->matchers[$matcher]->match($view, $matcherConfig)) {
                return false;
            }
        }

        return true;
    }