/** * Checks if $valueObject matches $matcher rules. * * @param \eZ\Publish\Core\MVC\Symfony\Matcher\Block\MatcherInterface|\eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface $matcher * @param ValueObject $valueObject * * @throws InvalidArgumentException * * @return bool */ protected function doMatch(BaseMatcherInterface $matcher, ValueObject $valueObject) { if (!$valueObject instanceof Block) { throw new InvalidArgumentException('Value object must be a valid Block instance'); } return $matcher->matchBlock($valueObject); }
/** * Checks if $valueObject matches $matcher rules. * * @param \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MatcherInterface $matcher * @param ValueObject $valueObject * * @throws \InvalidArgumentException * * @return bool */ protected function doMatch(MatcherInterface $matcher, ValueObject $valueObject) { if (!$valueObject instanceof ContentInfo) { throw new InvalidArgumentException('Value object must be a valid ContentInfo instance'); } return $matcher->matchContentInfo($valueObject); }
/** * Checks if $valueObject matches $matcher rules. * * @param \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MatcherInterface $matcher * @param ValueObject $valueObject * * @throws \InvalidArgumentException * @return bool */ protected function doMatch(MatcherInterface $matcher, ValueObject $valueObject) { if (!$valueObject instanceof Location) { throw new InvalidArgumentException('Value object must be a valid Location instance'); } return $matcher->matchLocation($valueObject); }
/** * Checks if $valueObject matches $matcher rules. * * @param \eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface $matcher * @param \eZ\Publish\Core\MVC\Symfony\View\View $view * * @return bool * @internal param \eZ\Publish\API\Repository\Values\ValueObject $valueObject */ protected function doMatch(MatcherInterface $matcher, View $view) { if (!$view instanceof ContentValueView) { throw new InvalidArgumentException('View must be a ContentValueView instance'); } return $matcher->match($view); }
/** * Checks if $valueObject matches $matcher rules. * * @param \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MatcherInterface $matcher * @param ValueObject $valueObject * * @throws \InvalidArgumentException * * @return bool */ protected function doMatch(MatcherInterface $matcher, View $view) { @trigger_error("LocationMatcherFactory 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); if (!$view instanceof LocationValueView) { throw new InvalidArgumentException('Value object must be a valid Location instance'); } return $matcher->matchLocation($view); }
/** * Checks if $valueObject matches $matcher rules. * * @param \eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface $matcher * @param ValueObject $valueObject * * @throws InvalidArgumentException * * @return bool */ protected function doMatch(BaseMatcherInterface $matcher, View $view) { return $matcher->match($view); }