Skip to content
PHP Ecosystem
Explore

ValidatorConfiguration

API reference › PHPStan › rules › ValidatorConfiguration

final readonly classyii2\extensions\phpstan\rules\ValidatorConfiguration
Sourcesrc/rules/ValidatorConfiguration.php

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.

PropertyTypeDescriptionDefined by
$configuration readonly constructorCreateObjectConfigurationValidator 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 constructorstringContainer ID or class name that Yii::createObject() receives as the class of the validator.ValidatorConfiguration
$writtenOptions readonly constructorlist<string>Names of the options written in the rule after position 1, in rule order.ValidatorConfiguration
MethodDescriptionDefined by
__construct()Stores the selected class ID, the resolved configuration and the options the rule writes.ValidatorConfiguration
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

ParameterTypeDescription
$idstringContainer ID or class name that Yii::createObject() receives as the class of the validator.
$configurationCreateObjectConfigurationValidator class Yii creates and the options of the call that it assigns: alias defaults, written options and the options Validator::createValidator() sets.
$writtenOptionslist<string>Names of the options written in the rule after position 1, in rule order.