GraphQL\Utils\MixedStore::offsetSet PHP Метод

offsetSet() публичный Метод

Offset to set
С версии: 5.0.0
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed

The offset to assign the value to.

$value mixed

The value to set.

Результат void
    public function offsetSet($offset, $value)
    {
        if (is_scalar($offset)) {
            $this->scalarStore[$offset] = $value;
        } else {
            if (is_object($offset)) {
                $this->objectStore[$offset] = $value;
            } else {
                if (is_array($offset)) {
                    $this->arrayKeys[] = $offset;
                    $this->arrayValues[] = $value;
                } else {
                    throw new \InvalidArgumentException("Unexpected offset type: " . Utils::printSafe($offset));
                }
            }
        }
    }