PHP Класс eZ\Publish\Core\MVC\Symfony\Matcher\AbstractMatcherFactory
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).
Показать файл
Открыть проект
Примеры использования класса
Защищенные свойства (Protected)
Открытые методы
Метод |
Описание |
|
__construct ( eZ\Publish\API\Repository\Repository $repository, array $matchConfig = [] ) |
|
|
match ( eZ\Publish\Core\MVC\Symfony\View\View $view ) : array | null |
Checks if $valueObject has a usable configuration for $viewType. |
|
Защищенные методы
Метод |
Описание |
|
doMatch ( eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface $matcher, eZ\Publish\Core\MVC\Symfony\View\View $valueObject ) : boolean |
Checks if $valueObject matches $matcher rules. |
|
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, array $matchConfig = [] ) |
$repository |
eZ\Publish\API\Repository\Repository |
|
$matchConfig |
array |
|
doMatch()
абстрактный защищенный Метод
Checks if $valueObject matches $matcher rules.
abstract protected doMatch ( eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface $matcher, eZ\Publish\Core\MVC\Symfony\View\View $valueObject ) : boolean |
$matcher |
eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface |
|
$valueObject |
eZ\Publish\Core\MVC\Symfony\View\View |
|
Результат |
boolean |
|
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 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). |
Результат |
eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface |
|
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. |
Описание свойств
$alreadyMatched защищенное свойство
protected SplObjectStorage[] $alreadyMatched |
Результат |
SplObjectStorage[] |
|
$matchConfig защищенное свойство
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 |
|