ExpressionValidator

class ExpressionValidator extends ConstraintValidator Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator __construct($propertyAccessor = null, ExpressionLanguage $expressionLanguage = null) validate(mixed $value, Constraint $c

ExpressionVoter

class ExpressionVoter implements VoterInterface ExpressionVoter votes based on the evaluation of an expression. Methods __construct(ExpressionLanguage $expressionLanguage, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null) Constructor. addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) int vote(TokenInterface $token, mixed $subject, array $attributes) Returns the vote for the given parameters. Detail

ExpressionVoter::addExpressionLanguageProvider()

addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) Parameters ExpressionFunctionProviderInterface $provider

ExpressionRequestMatcher::setExpression()

setExpression(ExpressionLanguage $language, $expression) Parameters ExpressionLanguage $language $expression

ExpressionRequestMatcher

class ExpressionRequestMatcher extends RequestMatcher ExpressionRequestMatcher uses an expression to match a Request. Methods __construct(string|null $path = null, string|null $host = null, string|string[]|null $methods = null, string|string[]|null $ips = null, array $attributes = array(), string|string[]|null $schemes = null) from RequestMatcher matchScheme(string|string[]|null $scheme) Adds a check for the HTTP scheme. from RequestMatcher matchHost(string $regexp) Adds a check

ExpressionRequestMatcher::matches()

bool matches(Request $request) Decides whether the rule(s) implemented by the strategy matches the supplied request. Parameters Request $request The request to check for a match Return Value bool true if the request matches, false otherwise

ExpressionLanguageProvider

class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface Define some ExpressionLanguage functions. To get a service, use service('request'). To get a parameter, use parameter('kernel.debug'). Methods ExpressionFunction[] getFunctions() Details ExpressionFunction[] getFunctions() Return Value ExpressionFunction[] An array of Function instances

ExpressionLanguageProvider

class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface Define some ExpressionLanguage functions. Methods ExpressionFunction[] getFunctions() Details ExpressionFunction[] getFunctions() Return Value ExpressionFunction[] An array of Function instances

ExpressionLanguage::registerProvider()

registerProvider(ExpressionFunctionProviderInterface $provider) Parameters ExpressionFunctionProviderInterface $provider

ExpressionLanguage::register()

register(string $name, callable $compiler, callable $evaluator) Registers a function. Parameters string $name The function name callable $compiler A callable able to compile the function callable $evaluator A callable able to evaluate the function See also ExpressionFunction