Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Publish/Core/MVC/Symfony/Matcher/LocationMatcherFactory.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony\Matcher;
8
9 use eZ\Publish\API\Repository\Values\Content\Location;
10 use eZ\Publish\API\Repository\Values\ValueObject;
11 use eZ\Publish\Core\MVC\Symfony\View\LocationValueView;
12 use eZ\Publish\Core\MVC\Symfony\View\View;
13 use InvalidArgumentException;
14
18 class LocationMatcherFactory extends ContentBasedMatcherFactory
19 {
30 protected function doMatch(MatcherInterface $matcher, View $view)
31 {
32 @trigger_error(
33 "LocationMatcherFactory is deprecated, and will be removed in ezpublish-kernel 6.1.\n" .
34 'Use the ServiceAwareMatcherFactory with the relative namespace as a constructor argument.',
35 E_USER_DEPRECATED
36 );
37
38 if (!$view instanceof LocationValueView) {
39 throw new InvalidArgumentException('Value object must be a valid Location instance');
40 }
41
42 return $matcher->matchLocation($view);
43 }
44 }
eZ\Publish\API\Repository\Values\Content\Location
Definition: API/Repository/Values/Content/Location.php:32
eZ\Publish\API\Repository\Values\ValueObject
Definition: API/Repository/Values/ValueObject.php:21
eZ\Publish\Core\MVC\Symfony\Matcher\ContentBasedMatcherFactory
Definition: ContentBasedMatcherFactory.php:16
eZ\Publish\Core\MVC\Symfony\Matcher\LocationMatcherFactory
Definition: Publish/Core/MVC/Symfony/Matcher/LocationMatcherFactory.php:19
eZ\Publish\Core\MVC\Symfony\Matcher\LocationMatcherFactory\doMatch
doMatch(MatcherInterface $matcher, View $view)
Checks if $valueObject matches $matcher rules.
Definition: Publish/Core/MVC/Symfony/Matcher/LocationMatcherFactory.php:30
eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface
Base interface for matchers.
Definition: MatcherInterface.php:15
eZ\Publish\Core\MVC\Symfony\View\LocationValueView
Definition: LocationValueView.php:10
eZ\Publish\Core\MVC\Symfony\View\View
Main interface for Views of Value objects (content, block...).
Definition: Publish/Core/MVC/Symfony/View/View.php:16
eZ\Publish\Core\MVC\Symfony\Matcher
Definition: AbstractMatcherFactory.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.