lib/View/TemplateResolver.php
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;
    }
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;
    }
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 ; }
Matches the view to provided config with configured matchers.
Matches the view to provided config with configured matchers .