0 follower

Interface Yiisoft\Validator\AfterInitAttributeEventInterface

Implemented byYiisoft\Validator\Rule\AnyRule, Yiisoft\Validator\Rule\Callback, Yiisoft\Validator\Rule\Composite, Yiisoft\Validator\Rule\Each, Yiisoft\Validator\Rule\Nested, Yiisoft\Validator\Rule\StopOnError

An optional interface for rules to implement. It provides {@see afterInitAttribute()} method-based event allowing to execute custom code after a rule instance was created from a PHP attribute either when using {@see ObjectDataSet}, {@see AttributesRulesProvider} or {@see ObjectParser} directly.

Public Methods

Hide inherited methods

Method Description Defined By
afterInitAttribute() Method-based event allowing to execute custom code after a rule instance was created from a PHP attribute when using {@see ObjectDataSet}, {@see AttributesRulesProvider} or {@see ObjectParser} directly. Yiisoft\Validator\AfterInitAttributeEventInterface

Method Details

Hide inherited methods

afterInitAttribute() public abstract method

Method-based event allowing to execute custom code after a rule instance was created from a PHP attribute when using {@see ObjectDataSet}, {@see AttributesRulesProvider} or {@see ObjectParser} directly.

public abstract void afterInitAttribute ( object $object )
$object object

An object containing rules within attributes.

                public function afterInitAttribute(object $object): void;