Interface RuleProviderResolverInterface
Interface for rule providers that can resolve a validation rule's method to an alternate object and method name.
Rule providers implementing this interface allow validators to invoke a rule's method on another object, e.g. ORM tables resolving rule methods provided by behaviors. Resolving the provider and method before the rule's callable is created ensures the method's signature can be correctly reflected for passing the validation context.
Namespace: Cake\Validation
Method Summary
-
resolveRuleProvider() public
Get the object and method that should be used to invoke the given rule method.
Method Detail
resolveRuleProvider() ΒΆ public
resolveRuleProvider(string $method): array{0: object, 1: string}|null
Get the object and method that should be used to invoke the given rule method.
Parameters
-
string$method The name of the rule method.
Returns
array{0: object, 1: string}|nullProvider and method to invoke, or null to invoke the method on the provider itself.