function Constraint::__set
Sets the value of a lazily initialized option.
Corresponding properties are added to the object on first access. Hence this method will be called at most once per constraint instance and option name.
Throws
InvalidOptionsException If an invalid option name is given
2 calls to Constraint::__set()
- File::__set in vendor/
symfony/ validator/ Constraints/ File.php - Sets the value of a lazily initialized option.
- File::__set in vendor/
symfony/ validator/ Constraints/ File.php - Sets the value of a lazily initialized option.
1 method overrides Constraint::__set()
- File::__set in vendor/
symfony/ validator/ Constraints/ File.php - Sets the value of a lazily initialized option.
File
-
vendor/
symfony/ validator/ Constraint.php, line 189
Class
- Constraint
- Contains the properties of a constraint definition.
Namespace
Symfony\Component\ValidatorCode
public function __set(string $option, mixed $value) : void {
if ('groups' === $option) {
$this->groups = (array) $value;
return;
}
throw new InvalidOptionsException(\sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [
$option,
]);
}