Sets the start position of the parent object inside the protein

@param int $position
@throws \InvalidArgumentException If argument is non-integer
774688
public function setStart($position)
    {
        if (! is_int($position)) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type integer. Argument type is ' . gettype($position));
        }

        $this->start = $position;
    }
37328
final protected function shiftLeftFromPos($position)
    {
        $cnt = parent::count();
        if ($position < 1 || $position >= $cnt) {
            throw new \OutOfBoundsException('position to shift from must be in range 1..Length-1');
        }
        for ($i = $position; $i < $cnt; $i++) {
            $this->items[$i - 1] = $this->items[$i];
        }
    }
420618
public function position(string $position): Log
    {
        $acceptablePositions = [
            'top right',
            'top left',
            'bottom right',
            'bottom left'
        ];

        if (array_search(strtolower($position), $acceptablePositions) === false) {
            $acceptablePositions = implode(', ', $acceptablePositions);
            throw new \Exception("position can only be: ${acceptablePositions}");
        }

        $this->position = $position;
        Alertify::flash();
        return $this;
    }
160492
public function insertAt($position = null)
    {
        if (null === $position) {
            $position = $this->listifyTop();
        }

        $this->insertAtPositionAndReorder($position);

        return $this;
    }
8301
public void setSplitterPosition(int position) {
        mSplitterPosition = clamp(position, 0, Integer.MAX_VALUE);
        mSplitterPositionPercent = -1;
        remeasure();
        notifySplitterPositionChanged(false);
    }
1006930
public function setIndex($position)
	{
		if ( ! is_int($position) || $position < 0)
		{
			throw new \InvalidArgumentException('Wrong index value.');
		}
		
		$this->index = $position;
		
		return $this;
	}
630399
protected function decrementPositionsOfItemsBelow($position = null)
    {
        if ($this->isNotInList()) return;

        if (null === $position) {
            $position = $this->getListifyPosition();
        }

        $this->listifyScopedQuery()
            ->where($this->positionColumn(), '>', $position)
            ->decrement($this->positionColumn());
    }
1174681
public function setParent($parent)
    {
        if ($parent !== null &&  !$parent instanceof BaseEntry) {
            throw new \InvalidArgumentException('An entry may only have another entry as parent');
        }

        $this->parent = $parent;
    }
1246210
private function incrementPositions(array $conditions, ?int $startPosition = null, ?int $endPosition = null): void
    {
        $columnName = $conditions['column'];

        $query = $this->connection->createQueryBuilder();

        $query
            ->update($conditions['table'])
            ->set($columnName, $columnName . ' + 1');

        if ($startPosition !== null) {
            $query->andWhere($query->expr()->gte($columnName, ':start_position'));
            $query->setParameter('start_position', $startPosition, Type::INTEGER);
        }

        if ($endPosition !== null) {
            $query->andWhere($query->expr()->lte($columnName, ':end_position'));
            $query->setParameter('end_position', $endPosition, Type::INTEGER);
        }

        $this->applyConditions($query, $conditions['conditions']);

        $query->execute();
    }
1080697
public function delete($position, $length = null)
	{
		ArgumentValidator::validateUnsignedInteger($position);
		ArgumentValidator::validateUnsignedIntegerOrNull($length);
		if ($position >= $this->length()) {
			throw new \InvalidArgumentException('Position invalid');
		}
		if ($length === null) {
			$this->string = mb_substr($this->string, 0, $position);
		} else {
			$this->string = mb_substr($this->string, 0, $position) . mb_substr($this->string, $position + $length);
		}
		return $this;
	}
1119392
public function setPosition($position)
    {
        if (false === Numeric::isPositiveInteger($position, false)) {
            throw new InvalidArgumentException('A position must be a positive integer.');
        }
        $this->_position = $position;
        return $this;
    }
1081812
public function charAt($position)
	{
		ArgumentValidator::validateUnsignedInteger($position);
		if ($position >= $this->length()) {
			throw new \InvalidArgumentException('Position invalid');
		}
		return mb_substr($this->string, $position, 1);
	}
101257
public function set($pos, $value){
		
		if(!\is_bool($value)){
			throw new \InvalidArgumentException('$value is not a bool');
		}
		
		$this->offsetSet($pos, $value);
		
	}
1150369
public function setPosition($position)
    {
        $oldPosition = $this->owner->{$this->positionAttribute};
        $transaction = $this->owner->getDb()->beginTransaction();
        try {
            $isUp = ($position - $oldPosition) > 0;
            $counters = [$this->positionAttribute => $isUp ? -1 : 1];
            $condition = [
                'between',
                $this->positionAttribute,
                $isUp ? $oldPosition : $position,
                $isUp ? $position : $oldPosition,
            ];
            $this->owner->updateAllCounters($counters, $condition);

            $this->owner->{$this->positionAttribute} = $position;
            $this->owner->save();

            $transaction->commit();

            return true;
        } catch (\Exception $e) {
            $transaction->rollBack();
            Yii::error($e);

            return false;
        }
    }
704393
public function setStartPositionId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->start_position_id !== $v) {
            $this->start_position_id = $v;
            $this->modifiedColumns[SkillTableMap::COL_START_POSITION_ID] = true;
        }

        if ($this->aStartPosition !== null && $this->aStartPosition->getId() !== $v) {
            $this->aStartPosition = null;
        }

        return $this;
    }
987428
public function setFirst($first)
    {
        if (Format::isIdentifier($first)) {
            $this->first = $first;
        } else {
            $msg = "'${first}' is an invalid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
507845
public function seek($position)
    {
        if (! isset($this->string[$position])) {
            throw new OutOfBoundsException("invalid seek position ($position)");
        }
        $this->position = $position;
        return $this;
    }