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

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory Class Reference

Base for MatcherFactory classes. More...

Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory:

## Public Member Functions
| __construct (Repository $repository, array $matchConfig=[])
| match (View $view)
| Checks if $valueObject has a usable configuration for $viewType. More...

## Protected Member Functions
| getMatcher ($matcherIdentifier)
| Returns the matcher object. More...
| doMatch (MatcherInterface $matcher, View $valueObject)
| Checks if $valueObject matches $matcher rules. More...

## Protected Attributes
| $repository
| $matchConfig
| $matchers
| $matcherRelativeNamespace
| $alreadyMatched

## Detailed Description

Base for MatcherFactory classes.

Implementors can define MATCHER_RELATIVE_NAMESPACE constant. If so, getMatcher() will return instances of objects relative to this namespace if $matcherIdentifier argument doesn't begin with a '\' (FQ class name).

Deprecated:
  Deprecated since 6.0, will be removed in 6.1. Use ClassNameMatcherFactory instead.

Definition at line 23 of file AbstractMatcherFactory.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::__construct | ( | Repository | $repository,
|  | array | $matchConfig = `[]`
| ) |  |

Definition at line 49 of file AbstractMatcherFactory.php.

References eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory\$matchConfig, and eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory\$repository.

## Member Function Documentation

## ◆ doMatch()

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::doMatch | ( | MatcherInterface | $matcher,
|  | View | $valueObject
| ) |  |
| abstract protected

Checks if $valueObject matches $matcher rules.

Parameters

  \eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | $matcher |
  \eZ\Publish\Core\MVC\Symfony\View\View | $valueObject |

Returns
  bool

Reimplemented in eZ\Publish\Core\MVC\Symfony\Matcher\LocationMatcherFactory, and eZ\Publish\Core\MVC\Symfony\Matcher\ContentMatcherFactory.

## ◆ getMatcher()

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::getMatcher | ( |  | $matcherIdentifier | ) |
| protected

Returns the matcher object.

Parameters

  string | $matcherIdentifier | 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).

Exceptions

  InvalidArgumentException |

Returns
  \eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface|\eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface

Reimplemented in eZ\Publish\Core\MVC\Symfony\Matcher\ContentBasedMatcherFactory, eZ\Publish\Core\MVC\Symfony\Matcher\BlockMatcherFactory, eZ\Bundle\EzPublishCoreBundle\Matcher\LocationMatcherFactory, eZ\Bundle\EzPublishCoreBundle\Matcher\ContentMatcherFactory, and eZ\Bundle\EzPublishCoreBundle\Matcher\BlockMatcherFactory.

Definition at line 74 of file AbstractMatcherFactory.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory\match().

## ◆ match()

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::match | ( | View | $view | ) |

Checks if $valueObject has a usable configuration for $viewType.

If so, the configuration hash will be returned. $valueObject can be for example a Location or a Content object.

Parameters

  \eZ\Publish\Core\MVC\Symfony\View\View | $view |

Returns
  array|null The matched configuration as a hash, containing template or controller to use, or null if not matched.

Implements eZ\Publish\Core\MVC\Symfony\Matcher\MatcherFactoryInterface.

Definition at line 107 of file AbstractMatcherFactory.php.

References eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory\getMatcher(), and eZ\Publish\Core\MVC\Symfony\View\View\getViewType().

## Member Data Documentation

## ◆ $alreadyMatched

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::$alreadyMatched
| protected

Definition at line 47 of file AbstractMatcherFactory.php.

## ◆ $matchConfig

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::$matchConfig
| protected

Definition at line 29 of file AbstractMatcherFactory.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory\__construct().

## ◆ $matcherRelativeNamespace

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::$matcherRelativeNamespace
| protected

Definition at line 39 of file AbstractMatcherFactory.php.

## ◆ $matchers

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::$matchers
| protected

Definition at line 32 of file AbstractMatcherFactory.php.

## ◆ $repository

eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory::$repository
| protected

Definition at line 26 of file AbstractMatcherFactory.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Matcher\BlockMatcherFactory\__construct(), eZ\Bundle\EzPublishCoreBundle\Matcher\ContentMatcherFactory\__construct(), eZ\Bundle\EzPublishCoreBundle\Matcher\LocationMatcherFactory\__construct(), and eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory\__construct().

The documentation for this class was generated from the following file:

- AbstractMatcherFactory.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.