Generates a generic representation of the scalar, hash or list given in
$hashValue into the document, using an element of $hashElementName as
its parent.

@param string $hashElementName
@param mixed $hashValue
357415
public function generateFieldTypeHash($hashElementName, $hashValue)
    {
        $this->fieldTypeHashGenerator->generateHashValue(
            $this->json,
            $hashElementName,
            $hashValue
        );
    }
250755
public function createPostArray($hashFieldName = "ORDER_HASH")
    {
        if (!$this->prepareFields($hashFieldName)) {
            $this->errorMessage[] = 'POST ARRAY: Missing hash field name';
            return false;
        }
        return $this->formData;
    }
896065
public void setIntHeader (@Nonnull @Nonempty final String sName, final int nValue)
  {
    _setHeader (sName, Integer.toString (nValue));
  }
1316560
public AbstractSpecWithPrimaryKey<T> withPrimaryKey(String hashKeyName, Object hashKeyValue) {
        if (hashKeyName == null)
            throw new IllegalArgumentException();
        withPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue));
        return this;
    }
1147326
public function setTextValue($textValue)
    {
        if (\is_array($textValue) || \is_object($textValue)) {
            $m = "Invalid value type for attribute {$this->getFamilyCode()}.{$this->getAttributeCode()}, ";
            $m .= 'expecting string, got '.gettype($textValue);
            throw new \UnexpectedValueException($m);
        }
        $this->textValue = null === $textValue ? null : (string) $textValue;

        return $this;
    }
1157150
final public static function box($plainValue): self
    {
        foreach (static::valueNames() as $name) {
            if (self::constant($name) === $plainValue) {
                return self::__callStatic($name, []);
            }
        }

        $message = sprintf('Value %s is not within %s enumeration.', $plainValue, static::class);
        throw new InvalidArgumentException($message);
    }
110559
protected function setHashCallable($hashCallable)
    {
        if (!is_callable($hashCallable))
        {
            throw new InvalidHashCallableException('Hash callable cannot be called: '.serialize($hashCallable));
        }
        
        $this->hashCallable = $hashCallable;
        
        return $this;
    }
647025
public function update($hashValue = null, $rangeValue = null)
    {
        $this->setQueryClass(UpdateItem::class);

        if ($hashValue !== null) {
            $this->setPrimaryKey($hashValue, $rangeValue);
        }

        return $this;
    }
922090
public function hashCode()
    {
        $h = crc32(serialize($this->value)) ^ crc32($this->comparison);

        if ($this->table !== null) {
            $h ^= crc32($this->table);
        }

        if ($this->column !== null) {
            $h ^= crc32($this->column);
        }

        foreach ($this->clauses as $clause) {
            // TODO: I KNOW there is a php incompatibility with the following line
            // but I don't remember what it is, someone care to look it up and
            // replace it if it doesn't bother us?
            // $clause->appendPsTo($sb='',$params=array());
            $sb = '';
            $params = array();
            $clause->appendPsTo($sb, $params);
            $h ^= crc32(serialize(array($sb, $params)));
            unset ($sb, $params);
        }

        return $h;
    }
446583
protected function setNodeKey(NodeValue $nodeValue): void
    {
        if ($nodeValue->getCacheKey()) {
            return;
        }

        $fields = data_get($nodeValue->getTypeDefinition(), 'fields', []);
        $nodeKey = (new Collection($fields))->reduce(function (?string $key, FieldDefinitionNode $field): ?string {
            if ($key) {
                return $key;
            }

            $hasCacheKey = (new Collection($field->directives))
                ->contains(function (DirectiveNode $directive): bool {
                    return $directive->name->value === 'cacheKey';
                });

            return $hasCacheKey
                ? $field->name->value
                : $key;
        });

        if (! $nodeKey) {
            $nodeKey = (new Collection($fields))->reduce(function (?string $key, FieldDefinitionNode $field): ?string {
                if ($key) {
                    return $key;
                }

                $typeName = ASTHelper::getUnderlyingTypeName($field);

                return $typeName === 'ID'
                    ? $field->name->value
                    : $key;
            });
        }

        if (! $nodeKey && $nodeValue->getTypeDefinitionName() !== 'Query') {
            throw new DirectiveException(
                "No @cacheKey or ID field defined on {$nodeValue->getTypeDefinitionName()}"
            );
        }

        $nodeValue->setCacheKey($nodeKey);
    }
1255396
@Override
	public int hash(T value) {
		int i = 0;
		try {
			int code = this.comparators[0].hash(value.getField(keyPositions[0]));
			
			for (i = 1; i < this.keyPositions.length; i++) {
				code *= HASH_SALT[i & 0x1F]; // salt code with (i % HASH_SALT.length)-th salt component
				code += this.comparators[i].hash(value.getField(keyPositions[i]));
			}
			return code;
		}
		catch (NullPointerException npex) {
			throw new NullKeyFieldException(keyPositions[i]);
		}
		catch (IndexOutOfBoundsException iobex) {
			throw new KeyFieldOutOfBoundsException(keyPositions[i]);
		}
	}
124306
public function delete($hashValue = null, $rangeValue = null)
    {
        $this->setQueryClass(DeleteItem::class);

        if ($hashValue !== null) {
            $this->setPrimaryKey($hashValue, $rangeValue);
        }

        return $this;
    }
1016280
public function checkbox($name, $inputValue = 1, $checkByDefault = false)
    {
        $value = $this->value($name);
        // Define the state for the checkbox, when $value is null then we
        // use the $checkByDefault value directly, otherwise the checkbox will
        // be checked only if the $value is equal to the $inputValue.
        if (is_null($value)) {
            $checked = $checkByDefault;
        } else {
            $checked = $value == $inputValue;
        }

        $name = e($name);
        $inputValue = e($inputValue);
        $checked = $checked ? ' checked' : '';
        return "name=\"$name\" value=\"$inputValue\"$checked";
    }
259005
function stringToHash(hashAsString) {
        var entries = {};
        if (hashAsString) {
            var text = decodeURI(hashAsString);
            var items = text.split('&');
            angular.forEach(items, function (item) {
                var kv = item.split('=');
                var key = kv[0];
                var value = kv[1] || key;
                entries[key] = value;
            });
        }
        return entries;
    }
1029759
private function setSpecificAttributeKeyWithGivenId(\SimpleXMLElement $xml, $keyValue) {
        // Specific Attribute: change the key with the given id
        if ($xml->attributes()->id) {
            return (string) $xml->attributes()->id;
        }
        return $keyValue;
    }
836581
function hashElement(wholeMatch,m1) {

        var blockText = m1;

        blockText = blockText.replace(/\n\n/g,"\n");
        blockText = blockText.replace(/^\n/,"");
        blockText = blockText.replace(/\n+$/g,"");
        blockText = "\n\n~K" + (htmlBlock.push(blockText)-1) + "K\n\n";

        return blockText;
    }
392059
protected function createValueFromInput($inputValue)
    {
        if (is_array($inputValue)) {
            foreach ($inputValue as $inputValueItem) {
                if (!$inputValueItem instanceof Tag) {
                    return $inputValue;
                }
            }

            $inputValue = new Value($inputValue);
        }

        return $inputValue;
    }