PHP Класс eZ\Publish\Core\MVC\Symfony\Matcher\ClassNameMatcherFactory

A relative namespace can be defined. If so, getMatcher() will search for the requested matcher inside this namespace if a relative namespace (not starting with '\') is passed.
Наследование: implements eZ\Publish\Core\MVC\Symfony\Matcher\MatcherFactoryInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$alreadyMatched SplObjectStorage[] Key is the view type.
$matchConfig array Typically, one of the *_view siteaccess aware settings array.
$matcherRelativeNamespace string Namespace built-in matchers are relative to.
$matchers eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface[]
$repository eZ\Publish\API\Repository\Repository

Открытые методы

Метод Описание
__construct ( eZ\Publish\API\Repository\Repository $repository, $relativeNamespace = null, array $matchConfig = [] )
match ( eZ\Publish\Core\MVC\Symfony\View\View $view ) : array | null Checks if $valueObject has a usable configuration for $viewType.
setMatchConfig ( array $matchConfig ) : AbstractMatcherFactory

Защищенные методы

Метод Описание
getMatcher ( string $matcherIdentifier ) : eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface Returns the matcher object.

Описание методов

__construct() публичный Метод

public __construct ( eZ\Publish\API\Repository\Repository $repository, $relativeNamespace = null, array $matchConfig = [] )
$repository eZ\Publish\API\Repository\Repository
$matchConfig array

getMatcher() защищенный Метод

Returns the matcher object.
protected getMatcher ( string $matcherIdentifier ) : eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface
$matcherIdentifier string The matcher identifier. If it begins with a '\' it means it's a FQ class name. If it does not and a relative namespace is set, it is searched inside the relative namespace if set.
Результат eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface

match() публичный Метод

If so, the configuration hash will be returned. $valueObject can be for example a Location or a Content object.
public match ( eZ\Publish\Core\MVC\Symfony\View\View $view ) : array | null
$view eZ\Publish\Core\MVC\Symfony\View\View
Результат array | null The matched configuration as a hash, containing template or controller to use, or null if not matched.

setMatchConfig() публичный Метод

public setMatchConfig ( array $matchConfig ) : AbstractMatcherFactory
$matchConfig array
Результат AbstractMatcherFactory

Описание свойств

$alreadyMatched защищенное свойство

Key is the view type.
protected SplObjectStorage[] $alreadyMatched
Результат SplObjectStorage[]

$matchConfig защищенное свойство

Typically, one of the *_view siteaccess aware settings array.
protected array $matchConfig
Результат array

$matcherRelativeNamespace защищенное свойство

Namespace built-in matchers are relative to.
protected string $matcherRelativeNamespace
Результат string

$matchers защищенное свойство

protected MatcherInterface[],eZ\Publish\Core\MVC\Symfony\Matcher $matchers
Результат eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface[]

$repository защищенное свойство

protected Repository,eZ\Publish\API\Repository $repository
Результат eZ\Publish\API\Repository\Repository