Converts current $value to Entity
@param $value
@param $index (not used)
@param $userdata
350097
private function _make(&$value, $index, $userdata)
    {
        list($entity, $attribute) = $userdata;

        $value = entity($entity)->findByAttribute($attribute, $value);
    }
59055
public function set($index, $value): Utility
    {
        $newBag = $this->toArray();

        $newBag[$index] = $value;

        return new self($newBag);
    }
1336142
public boolean addUserData(Object userData) {
		if (this.userData == null) {
			this.userData = new ArrayList<>();
		}
		return this.userData.add(userData);
	}
911605
public function offsetSet($name, $value)
    {
        if ($name && !is_numeric($name)) {
            throw new RuntimeException("Invalid index, should be numeric or empty.");
        }
        return $name === null ? $this->_data[] = $value : $this->_data[$name] = $value;
    }
782213
public function addMethodMetadata($method, $index, $value)
    {
        if (!isset($this->methodMetadata[$method])) {
            $this->methodMetadata[$method] = array($index => $value);
        } else {
            $this->methodMetadata[$method][$index] = $value;
        }

        return $this;
    }
290631
public function insert($index, $value)
    {
        $this->checkType($value);

        return parent::insert($index, $value);
    }
102621
public function insertAt(int $index, $value)
    {
        $array = $this->reindex()->asArray();

        Exception\InvalidArgumentException::verify(
            $index <= count($array),
            'The supplied index must not be greater than the amount of elements: expecting <= %s, %s given',
            count($array), $index
        );

        array_splice($array, $index, 0, [$value]);
        $this->updateElements(
            $this->scheme->createOrderedMap(
                $this->scheme->arrayIterator($array)
            )
        );
    }
891548
public function offsetSet($index, $value)
	{
		if ( ! $value instanceof StreamInterface)
		{
			throw new TranscoderException(sprintf('The new value must be an instance of %s', StreamInterface::class));
		}
		
		$this->streams[$index ?: $this->count()] = $value;
		
		return $this;
	}
872258
public function push($data, $value)
    {
        $index = count($this->map);
        $this->map[$index] = $data;
        for ($i = 0; $i < $this->baseCount * $value; $i++) {
            $this->randomArr[] = $index;
        }
    }
891314
def setData(self, index, value, role=QtCore.Qt.UserRole):
        
        if role == QtCore.Qt.EditRole:
            if isinstance(value, QtCore.QVariant):
                value = value.toPyObject()
            elif isinstance(value, QtCore.QString):
                value = str(value)
            self.model.setVerifiedValue(index.row(), self._headers[index.column()], value)
            self.countChanged.emit()
        elif role == QtCore.Qt.UserRole:
            row = index.row()
            if row == -1:
                row = self.rowCount() -1
            self.model.overwriteParam(row, value)
        return True
193722
public function addPropertyMetadata($property, $index, $value)
    {
        if (!isset($this->propertyMetadata[$property])) {
            $this->propertyMetadata[$property] = array($index => $value);
        } else {
            $this->propertyMetadata[$property][$index] = $value;
        }

        return $this;
    }
441174
public static function validIndex( $index, $value )
    {
        if ( is_array( $value ) )
        {
            return ( count( $value ) > $index && $index >= 0 );
        }
        elseif ( is_string( $value ) )
        {
            return ( strlen( $value ) > $index && $index >= 0 );
        }

        return FALSE;
    }
889350
public UserBuilder withData(String name, Object value) {
        if (this.data == null) {
            this.data = new HashMap<>();
        }

        this.data.put(name, value);
        return this;
    }
267301
public function setData($newdata, $value = '')
    {
        if (is_string($newdata)) {
            $newdata = [$newdata => $value];
        }

        if (!empty($newdata)) {
            foreach ($newdata as $key => $val) {
                $this->data[$key] = $val;
            }
        }
    }
970197
public function convertToDatabaseValue($value, AbstractPlatform $platform)
    {
        if (empty($value)) {
            return null;
        }

        if ($value instanceof Uuid || Uuid::isValid($value)) {
            return (string) $value;
        }

        throw ConversionException::conversionFailed($value, self::NAME);
    }
772299
public function isSelectedValue($dataValue, $userValue)
    {
        if (is_array($userValue) && in_array($dataValue, $userValue)) {
            return true;
        }
        
        return parent::isSelectedValue($dataValue, $userValue);
    }
162172
protected function setValue($index, $value)
    {
        if (gettype($value) === 'object') {
            $this->values[$index] = $value;
        } else {
            $class_name = $this->fields[$index];
            $real_class_name = __NAMESPACE__ . "\\" . $class_name;
            $this->values[$index] = new $real_class_name();
            $this->values[$index]->value = $value;
        }
        return $this;
    }