Neos\ContentRepository\Security\Authorization\Privilege\Node\ReadNodePrivilege::matchesSubject PHP Метод

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

public matchesSubject ( Neos\Flow\Security\Authorization\Privilege\PrivilegeSubjectInterface $subject ) : boolean
$subject Neos\Flow\Security\Authorization\Privilege\PrivilegeSubjectInterface
Результат boolean
    public function matchesSubject(PrivilegeSubjectInterface $subject)
    {
        if (!$subject instanceof NodePrivilegeSubject) {
            throw new InvalidPrivilegeTypeException(sprintf('Privileges of type "%s" only support subjects of type "%s", but we got a subject of type: "%s".', static::class, NodePrivilegeSubject::class, get_class($subject)), 1465979693);
        }
        $nodeContext = new NodePrivilegeContext($subject->getNode());
        $eelContext = new Context($nodeContext);
        $eelCompilingEvaluator = new CompilingEvaluator();
        $eelCompilingEvaluator->evaluate($this->getParsedMatcher(), $eelContext);
        return $eelCompilingEvaluator->evaluate($this->getParsedMatcher(), $eelContext);
    }