You are here

public function File::__set in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Constraints/File.php \Symfony\Component\Validator\Constraints\File::__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.

Parameters

string $option The option name:

mixed $value The value to set:

Throws

InvalidOptionsException If an invalid option name is given

Overrides Constraint::__set

File

vendor/symfony/validator/Constraints/File.php, line 69

Class

File
@Target({"PROPERTY", "METHOD", "ANNOTATION"})

Namespace

Symfony\Component\Validator\Constraints

Code

public function __set($option, $value) {
  if ('maxSize' === $option) {
    $this
      ->normalizeBinaryFormat($value);
    return;
  }
  parent::__set($option, $value);
}