PHP Class 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).
Inheritance: implements eZ\Publish\Core\MVC\Symfony\Matcher\MatcherFactoryInterface
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$alreadyMatched SplObjectStorage[] Key is the view type.
$matchConfig array
$matcherRelativeNamespace string Namespace built-in matchers are relative to.
$matchers eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface[]
$repository eZ\Publish\API\Repository\Repository

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

doMatch() abstract protected méthode

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
Résultat boolean

getMatcher() protected méthode

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).
Résultat eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface | eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface

match() public méthode

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
Résultat array | null The matched configuration as a hash, containing template or controller to use, or null if not matched.

Property Details

$alreadyMatched protected_oe property

Key is the view type.
protected SplObjectStorage[] $alreadyMatched
Résultat SplObjectStorage[]

$matchConfig protected_oe property

protected array $matchConfig
Résultat array

$matcherRelativeNamespace protected_oe property

Namespace built-in matchers are relative to.
protected string $matcherRelativeNamespace
Résultat string

$matchers protected_oe property

protected MatcherInterface[],eZ\Publish\Core\MVC\Symfony\Matcher $matchers
Résultat eZ\Publish\Core\MVC\Symfony\Matcher\MatcherInterface[]

$repository protected_oe property

protected Repository,eZ\Publish\API\Repository $repository
Résultat eZ\Publish\API\Repository\Repository