Deprecation: since 6.0.0. ViewMatcherInterface, that inherits from this interface, should be used instead.
コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
 /**
  * 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);
 }
コード例 #4
0
 /**
  * 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);
 }
コード例 #5
0
 /**
  * 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);
 }
コード例 #6
0
 /**
  * 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);
 }