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

Core/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound;
8
9 use eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound;
10 use eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher;
11
15 class LogicalOr extends Compound
16 {
17 const NAME = 'logicalOr';
18
19 public function match()
20 {
21 foreach ($this->config as $i => $rule) {
22 foreach ($rule['matchers'] as $subMatcherClass => $matchingConfig) {
23 if ($this->matchersMap[$i][$subMatcherClass]->match()) {
24 $this->subMatchers = $this->matchersMap[$i];
25
26 return $rule['match'];
27 }
28 }
29 }
30
31 return false;
32 }
33
34 public function reverseMatch($siteAccessName)
35 {
36 foreach ($this->config as $i => $rule) {
37 if ($rule['match'] === $siteAccessName) {
38 foreach ($this->matchersMap[$i] as $subMatcher) {
39 if (!$subMatcher instanceof VersatileMatcher) {
40 continue;
41 }
42
43 $reverseMatcher = $subMatcher->reverseMatch($siteAccessName);
44 if (!$reverseMatcher) {
45 continue;
46 }
47
48 $this->setSubMatchers([$subMatcher]);
49
50 return $this;
51 }
52 }
53 }
54 }
55 }
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalOr
Siteaccess matcher that allows a combination of matchers, with a logical OR.
Definition: Core/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php:16
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalOr\NAME
const NAME
Definition: Core/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php:17
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalOr\reverseMatch
reverseMatch($siteAccessName)
Returns matcher object corresponding to $siteAccessName or null if non applicable.
Definition: Core/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php:34
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalOr\match
match()
Returns matched Siteaccess or false if no siteaccess could be matched.
Definition: Core/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php:19
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound
Base for Compound siteaccess matchers.
Definition: Compound.php:19
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\setSubMatchers
setSubMatchers(array $subMatchers)
Replaces sub-matchers.
Definition: Compound.php:98
eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher
Interface for SiteAccess matchers.
Definition: VersatileMatcher.php:16
eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound
Definition: Core/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.