Returns the matcher object.
protected getMatcher ( string $matcherIdentifier ) : eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface | ||
$matcherIdentifier | string | The matcher class. If it begins with a '\' it means it's a FQ class name, otherwise it is relative to static::MATCHER_RELATIVE_NAMESPACE namespace (if available). |
return | eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface |
protected function getMatcher($matcherIdentifier) { $matcher = parent::getMatcher($matcherIdentifier); if (!$matcher instanceof BlockMatcherInterface) { throw new InvalidArgumentException('Matcher for Blocks must implement eZ\\Publish\\Core\\MVC\\Symfony\\Matcher\\Block\\MatcherInterface.'); } return $matcher; }
protected function getMatcher($matcherIdentifier) { @trigger_error("ContentBasedMatcherFactory is deprecated, and will be removed in ezpublish-kernel 6.1.\n" . 'Use the ServiceAwareMatcherFactory with the relative namespace as a constructor argument.', E_USER_DEPRECATED); $matcher = parent::getMatcher($matcherIdentifier); if (!$matcher instanceof ContentBasedMatcherInterface) { throw new InvalidArgumentException('Content based Matcher must implement eZ\\Publish\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MatcherInterface.'); } return $matcher; }