RuleCompiler
final class RuleCompiler
Compile pipe-string or array rules into an AttributePlan.
Each rule part becomes either an InlineCheck (fast, match-dispatched) or a DelegatedCheck (calls existing validate*() methods). The compiler resolves sibling context (size mode, date format, array presence) to bake compile-time decisions into check params.
Methods
Compile a per-attribute rule array into an AttributePlan with inlining.
Compile all rules as DelegatedCheck (no inlining).
Details
at line 29
static AttributePlan
compile(array $rules)
Compile a per-attribute rule array into an AttributePlan with inlining.
Used for the base Validator class. Subclasses use compileAllDelegated().
at line 52
static AttributePlan
compileAllDelegated(array $rules)
Compile all rules as DelegatedCheck (no inlining).
Used for Validator subclasses which may override validate*() methods. Shares the same flag pre-resolution so the execution loop's attribute-level logic (sometimes, excluded) still works.