0 follower

Interface Yiisoft\Validator\RuleHandlerResolverInterface

Implemented byYiisoft\Validator\RuleHandlerResolver\RuleHandlerContainer, Yiisoft\Validator\RuleHandlerResolver\SimpleRuleHandlerContainer

An interface allowing to resolve a rule handler name to a corresponding rule handler instance.

Public Methods

Hide inherited methods

Method Description Defined By
resolve() Resolves a rule handler name to a corresponding rule handler instance. Yiisoft\Validator\RuleHandlerResolverInterface

Method Details

Hide inherited methods

resolve() public abstract method

Resolves a rule handler name to a corresponding rule handler instance.

public abstract resolve( string $name ): Yiisoft\Validator\RuleHandlerInterface
$name string

A rule handler name (Yiisoft\Validator\RuleInterface).

return Yiisoft\Validator\RuleHandlerInterface

A corresponding rule handler instance.

throws Yiisoft\Validator\Exception\RuleHandlerNotFoundException

If a rule handler instance was not found.

throws Yiisoft\Validator\Exception\RuleHandlerInterfaceNotImplementedException

If a found instance is not a valid rule handler.

                public function resolve(string $name): RuleHandlerInterface;