function Constraint::__get
Returns 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
4 calls to Constraint::__get()
- File::__get in vendor/
symfony/ validator/ Constraints/ File.php - Returns the value of a lazily initialized option.
- File::__get in vendor/
symfony/ validator/ Constraints/ File.php - Returns the value of a lazily initialized option.
- Valid::__get in vendor/
symfony/ validator/ Constraints/ Valid.php - Returns the value of a lazily initialized option.
- Valid::__get in vendor/
symfony/ validator/ Constraints/ Valid.php - Returns the value of a lazily initialized option.
2 methods override Constraint::__get()
- File::__get in vendor/
symfony/ validator/ Constraints/ File.php - Returns the value of a lazily initialized option.
- Valid::__get in vendor/
symfony/ validator/ Constraints/ Valid.php - Returns the value of a lazily initialized option.
File
-
vendor/
symfony/ validator/ Constraint.php, line 209
Class
- Constraint
- Contains the properties of a constraint definition.
Namespace
Symfony\Component\ValidatorCode
public function __get(string $option) : mixed {
if ('groups' === $option) {
$this->groups = [
self::DEFAULT_GROUP,
];
return $this->groups;
}
throw new InvalidOptionsException(\sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [
$option,
]);
}