eZ\Publish\Core\FieldType\Validator::__set PHP Method

__set() public method

Sets $value to constraint, identified by $name.
public __set ( string $name, mixed $value )
$name string
$value mixed
    public function __set($name, $value)
    {
        if (!array_key_exists($name, $this->constraints)) {
            throw new PropertyNotFound("The constraint '{$name}' is not valid for this validator.");
        }
        $this->constraints[$name] = $value;
    }