@param PropertyEditorAccessor $dataSetter
@param PropertyPath $propertyPath
@param mixed $value

@return EnrichHeaderWithValuePropertyEditor
962395
public static function create(PropertyEditorAccessor $dataSetter, PropertyPath $propertyPath, $value) : self
    {
        return new self($dataSetter, $propertyPath, $value);
    }
873002
public function setAccessorProperty(
        NameValue $name,
        FunctionTemplate $getter = null,
        FunctionTemplate $setter = null,
        $attribute = PropertyAttribute::NONE,
        $settings = AccessControl::DEFAULT_ACCESS
    ): void {
    }
1160515
static public function true($value, $message = null, $propertyPath = null)
        {
            if ($value !== true) {
                $message = $message ?: sprintf(
                    'Value "%s" is not TRUE.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_TRUE, $propertyPath);
            }
        }
46010
public function setClientIp($value)
    {
        if ($value === null || $value === '') {
            $this->_clientIp = null;
        } elseif (TypeCast::canCastToString($value)) {
            $this->_clientIp = (string)$value;
        } else {
            throw new InvalidPropertyValueTypeException(
                'Invalid clientIp value type in CreatePaymentRequest', 0, 'CreatePaymentRequest.clientIp', $value
            );
        }
    }
858476
static public function max($value, $maxValue, $message = null, $propertyPath = null)
        {
            static::integer($value);

            if ($value > $maxValue) {
                $message = $message ?: sprintf(
                    'Number "%s" was expected to be at most "%d".',
                    static::stringify($value),
                    static::stringify($maxValue)
                );

                throw static::createException($value, $message, static::INVALID_MAX, $propertyPath, array('max' => $maxValue));
            }
        }
395990
static public function file($value, $message = null, $propertyPath = null)
        {
            static::string($value, $message);
            static::notEmpty($value, $message);

            if ( ! is_file($value)) {
                $message = $message ?: sprintf(
                    'File "%s" was expected to exist.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_FILE, $propertyPath);
            }
        }
1338860
public function setValue($value, $data = null)
    {
        $value = $this->preventHtmlParserError($value);
        return parent::setValue($value, $data);
    }
131424
public function propertyPath($data, $propertyPath)
    {
        if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) {
            $propertyPath = new PropertyPath($propertyPath);
        }

        if ($propertyPath instanceof PropertyPathInterface && (\is_object($data) || $data instanceof \ArrayAccess)) {
            $data = $this->propertyAccessor->getValue($data, $propertyPath);
        }

        return $data;
    }
1093381
private Node makeReadOnlySetter(String propName, String qualifiedPath) {
    String setterName = "_set" + propName.substring(0, 1).toUpperCase() + propName.substring(1);
    Node fnNode = IR.function(IR.name(""), IR.paramList(IR.name(propName)), IR.block());
    compiler.reportChangeToChangeScope(fnNode);
    Node exprResNode =
        IR.exprResult(IR.assign(NodeUtil.newQName(compiler, qualifiedPath + setterName), fnNode));

    JSDocInfoBuilder info = new JSDocInfoBuilder(true);
    // This is overriding a generated function which was added to the interface in
    // {@code createExportsAndExterns}.
    info.recordOverride();
    exprResNode.getFirstChild().setJSDocInfo(info.build());

    return exprResNode;
  }
1015569
public function set(string $property, $value, $calculateMissing = true, $sanitizeSign = false)
    {
        $property = $this->translateProperty($property);

        $this->validateProperty($property);

        switch ($property) {
            case 'defaultType':
                $value = strtolower($value);

                if (!in_array($value, [static::GROSS, static::NET])) {
                    throw new InvalidArgumentException("defaultType invalid");
                }
                break;

            case 'taxPercent':
                if ($value < 0 || $value >= 100) {
                    throw new InvalidArgumentException("taxPercent invalid");
                }

                $this->{'taxRate'} = $value / 100 + 1;
                break;

            case 'taxRate':
                if ($value < 1 || $value >= 2) {
                    throw new InvalidArgumentException("taxRate invalid");
                }

                $this->{'taxPercent'} = $value * 100 - 100;
                break;

            case 'gross';
            case 'net';
            case 'tax';
                if ($sanitizeSign && $this->has('defaultType')) {
                    $defaultType = $this->getDefaultType();
                    if ($property != $defaultType && $this->has($defaultType)) {
                        if ($value < 0 != $this->get($defaultType) < 0) {
                            $value *= -1;
                        }
                    }
                }
                break;
        }

        $this->{$property} = $value;
        if (is_numeric($value)) {
            $this->calculate($calculateMissing);
        }

        return $this;
    }
445841
public function setConfigurationSetting($roleName, $name, $value)
    {
        $namespaceUri = $this->dom->lookupNamespaceUri($this->dom->namespaceURI);
        $xpath = new \DOMXpath($this->dom);
        $xpath->registerNamespace('sc', $namespaceUri);

        $xpathExpression = '//sc:Role[@name="' . $roleName . '"]//sc:ConfigurationSettings//sc:Setting[@name="' . $name . '"]';
        $settingList = $xpath->evaluate($xpathExpression);

        if ($settingList->length == 1) {
            $settingNode = $settingList->item(0);
        } else {
            $settingNode = $this->dom->createElementNS($namespaceUri, 'Setting');
            $settingNode->setAttribute('name', $name);

            $configSettingList = $xpath->evaluate('//sc:Role[@name="' . $roleName . '"]/sc:ConfigurationSettings');

            if ($configSettingList->length == 0) {
                throw new \RuntimeException("Cannot find <ConfigurationSettings /> in Role '" . $roleName . "'.");
            }

            $configSettings = $configSettingList->item(0);
            $configSettings->appendChild($settingNode);
        }

        $settingNode->setAttribute('value', $value);

        $this->save();
    }
1288114
public function setProperty($propertyName, $value)
    {
        if (!is_object($this->contentObjectProxy)) {
            switch ($this->getNodeType()->getPropertyType($propertyName)) {
                case 'references':
                    $nodeIdentifiers = [];
                    if (is_array($value)) {
                        foreach ($value as $nodeIdentifier) {
                            if ($nodeIdentifier instanceof NodeInterface || $nodeIdentifier instanceof AbstractNodeData) {
                                $nodeIdentifiers[] = $nodeIdentifier->getIdentifier();
                            } elseif (preg_match(NodeIdentifierValidator::PATTERN_MATCH_NODE_IDENTIFIER, $nodeIdentifier) !== 0) {
                                $nodeIdentifiers[] = $nodeIdentifier;
                            }
                        }
                    }
                    $value = $nodeIdentifiers;
                    break;
                case 'reference':
                    $nodeIdentifier = null;
                    if ($value instanceof NodeInterface || $value instanceof AbstractNodeData) {
                        $nodeIdentifier = $value->getIdentifier();
                    } elseif (preg_match(NodeIdentifierValidator::PATTERN_MATCH_NODE_IDENTIFIER, $value) !== 0) {
                        $nodeIdentifier = $value;
                    }
                    $value = $nodeIdentifier;
                    break;
            }

            $this->persistRelatedEntities($value);

            if (array_key_exists($propertyName, $this->properties) && $this->properties[$propertyName] === $value) {
                return;
            }

            $this->properties[$propertyName] = $value;

            $this->addOrUpdate();
        } elseif (ObjectAccess::isPropertySettable($this->contentObjectProxy->getObject(), $propertyName)) {
            $contentObject = $this->contentObjectProxy->getObject();
            ObjectAccess::setProperty($contentObject, $propertyName, $value);
            $this->updateContentObject($contentObject);
        }
    }
581626
static public function integer($value, $message = null, $propertyPath = null)
        {
            if ( ! is_int($value)) {
                $message = $message ?: sprintf(
                    'Value "%s" is not an integer.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_INTEGER, $propertyPath);
            }
        }
87236
public function setCoreWhichElementEditor($value)
    {
        $this->setFieldName('which_element_editor');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
143315
private function setPropertyValue($entity, $propertyPath, $value)
    {
        if (!$this->propertyAccessor->isWritable($entity, $propertyPath)) {
            throw new CustomObjectException(
                sprintf('Property "%s::$%s" is not writable.', ClassUtils::getClass($entity), $propertyPath)
            );
        }

        $this->propertyAccessor->setValue($entity, $propertyPath, $value);
    }
1155717
private function setTerminator($dataValue, $dataCounter, $dataBits, $totalDataBits, $maxDataBits)
    {
        if ( $totalDataBits <= ($maxDataBits - 4) ) {
            $dataValue[$dataCounter]  = 0;
            $dataBits[$dataCounter]   = 4;
        }
        else {
            if ( $totalDataBits < $maxDataBits ) {
                $dataValue[$dataCounter]  = 0;
                $dataBits[$dataCounter]   = $maxDataBits - $totalDataBits;
            }
            else {
                if ( $totalDataBits > $maxDataBits ) {
                    throw new OverflowException('QRCode : Overflow error');
                }
            }
        }
        return array($dataValue, $dataBits);
    }
1339596
protected function setProperty(JsonApiResource $entity, $property, $value)
    {
        $setter = 'set' . ucfirst($property);

        if (!method_exists($entity, $setter)) {
            throw RestException::missingSetter($entity, $property, $setter);
        }

        return $entity->$setter($value);
    }