ValidatorConfiguration
API reference › PHPStan › rules › ValidatorConfiguration
Represents the configuration of a Model::rules() entry whose created Validator and assignment path are
proven.
ValidatorConfigurationResolver for the conditions under which a configuration is resolved.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$configuration readonly constructor | CreateObjectConfiguration | Validator class Yii creates and the options of the call that it assigns: alias defaults, written options and the options Validator::createValidator() sets. | ValidatorConfiguration |
$id readonly constructor | string | Container ID or class name that Yii::createObject() receives as the class of the validator. | ValidatorConfiguration |
$writtenOptions readonly constructor | list<string> | Names of the options written in the rule after position 1, in rule order. | ValidatorConfiguration |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Stores the selected class ID, the resolved configuration and the options the rule writes. | ValidatorConfiguration |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $id, yii2\extensions\phpstan\rules\CreateObjectConfiguration $configuration, list<string> $writtenOptions)Stores the selected class ID, the resolved configuration and the options the rule writes.
Parameters
| Parameter | Type | Description |
|---|---|---|
$id | string | Container ID or class name that Yii::createObject() receives as the class of the validator. |
$configuration | CreateObjectConfiguration | Validator class Yii creates and the options of the call that it assigns: alias defaults, written options and the options Validator::createValidator() sets. |
$writtenOptions | list<string> | Names of the options written in the rule after position 1, in rule order. |