seta a informação de mês e verifica se já possui um dado anterior,
se tiver, verifica a possibilidade de passar para outro setor.
@param int $position
@param int $mes
540840
private function setMes(int $mes, int $position)
    {
        if (!$this->certeza['mes']) {
            if (isset($this->data['mes'])) {
                $current = $this->setDateInfo('dia', 'ano');
                if ($current) {
                    $this->data[$current] = $this->data['mes'];
                    $this->position[$current] = $this->position['mes'];
                }
            }
            $this->data['mes'] = $mes;
            $this->certeza['mes'] = true;
            $this->position['mes'] = $position;
        }
    }
1042825
public function seek($position)
    {
        if ($position < 0) {
            $position = 0;
        } elseif ($position > $this->count()) {
            $position = $this->count();
        }

        if (isset($this->rows[ $position ])) {
            $this->position = $position;
        }
    }
1120343
public function setItemPosition($position)
    {
        if ((int)$position >= 0) {
            // check if given position is larger as possible position
            if ($position >= ($countItems = $this->countItems())) {
                // set position to max possible position
                $position = $countItems - 1;
            }

            if ($position <= ($this->countItems() / 2)) {
                $this->getIteratorObject()->rewind();
                if (($countItems = $this->countItems()) > 0) {
                    $this->_itemPosition = $countItems - 1;
                } else {
                    $this->_itemPosition = 0;
                }

                // go with next
                while ($position != $this->_itemPosition) {
                    $this->getIteratorObject()->next();

                    if (!$this->getIteratorObject()->valid()) {
                        throw new IteratorDecoratorReverseException('Specified position is not valid (next).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemPosition--;
                    }
                }
            } else {
                $this->getIteratorObject()->last();

                if (!$this->getIteratorObject()->valid()) {
                    $this->_itemPosition = 0;
                } else {
                    $this->_itemPosition = 0;
                }

                // go with prev
                while ($position != $this->_itemPosition) {
                    $this->getIteratorObject()->previous();

                    if (!$this->getIteratorObject()->valid()) {
                        throw new IteratorDecoratorReverseException('Specified position is not valid (previous).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemPosition++;
                    }
                }
            }
        } else {
            throw new IteratorDecoratorReverseException('Specified position is not valid.', E_WARNING);
        }
    }
343019
public function ensure($pos, $length)
    {
        if ($pos >= $this->position
            && $pos < ($this->position + $this->bufferLength)
            && ($this->position + $this->bufferLength) >= ($pos + $length)
        ) {
            $this->offset = $pos - $this->position;
        } else {
            $this->reset($pos, $length);
        }
    }
408451
public function setPosition($position) : self
    {
        if (! (is_int($position) || is_null($position))) {
            throw new InvalidArgumentException(
                sprintf('Invalid $position type: "%s". Must be "int" or "null"', gettype($position))
            );
        }

        $this->position = $position;
        return $this;
    }
1300127
protected function validateMove($pos)
	{
		if ($this->getLeftValue() <= $pos && $this->getRightValue() >= $pos) {
			
			return false;
//			$dump = static::dump($this);
//			throw new Exception\InvalidOperation("The move not allowed for {$dump} to position $pos");
		}
		
		return true;
	}
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];
        }
    }
994903
protected function incrementPositionsOfItemsBelow($position)
    {
        $this->listifyScopedQuery()
            ->where($this->positionColumn(), '>=', $position)
            ->increment($this->positionColumn());
    }
1304955
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setActive($value);
                break;
            case 2:
                $this->setFiltertype($value);
                break;
            case 3:
                $this->setCode($value);
                break;
        } // switch()
    }
1284753
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setRemoteAppId($value);
                break;
            case 2:
                $this->setApiversion($value);
                break;
            case 3:
                $this->setName($value);
                break;
            case 4:
                $this->setVersion($value);
                break;
            case 5:
                $this->setConfigDisplayerrors($value);
                break;
            case 6:
                $this->setConfigBypasscache($value);
                break;
            case 7:
                $this->setConfigMinifymarkup($value);
                break;
            case 8:
                $this->setConfigDebugmode($value);
                break;
            case 9:
                $this->setConfigMaintenancemode($value);
                break;
            case 10:
                $this->setConfigGzipscripts($value);
                break;
            case 11:
                $this->setConfigRewriteurl($value);
                break;
            case 12:
                $this->setConfigAdminemail($value);
                break;
            case 13:
                $this->setConfigCachemode($value);
                break;
            case 14:
                $this->setStatuscode($value);
                break;
            case 15:
                $this->setExtensions($value);
                break;
            case 16:
                $this->setLog($value);
                break;
            case 17:
                $this->setPHP($value);
                break;
            case 18:
                $this->setMySQL($value);
                break;
        } // switch()
    }
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;
    }
45627
public function setEnd($position)
    {
        if (! is_int($position)) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type integer. Argument type is ' . gettype($position));
        }

        $this->end = $position;
    }
1307380
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setFile($value);
                break;
            case 2:
                $this->setPersonId($value);
                break;
            case 3:
                $this->setVisible($value);
                break;
            case 4:
                $this->setPosition($value);
                break;
            case 5:
                $this->setCreatedAt($value);
                break;
            case 6:
                $this->setUpdatedAt($value);
                break;
        } // switch()
    }
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;
        }
    }
212688
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setAttributeAvId($value);
                break;
            case 2:
                $this->setAttributeAttributeTypeId($value);
                break;
            case 3:
                $this->setLocale($value);
                break;
            case 4:
                $this->setValue($value);
                break;
            case 5:
                $this->setCreatedAt($value);
                break;
            case 6:
                $this->setUpdatedAt($value);
                break;
        } // switch()
    }
436131
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setTitle($value);
                break;
            case 2:
                $this->setSlug($value);
                break;
            case 3:
                $this->setAthleteLabel($value);
                break;
            case 4:
                $this->setObjectSlug($value);
                break;
            case 5:
                $this->setObjectLabel($value);
                break;
            case 6:
                $this->setObjectPluralLabel($value);
                break;
            case 7:
                $this->setSkillSlug($value);
                break;
            case 8:
                $this->setSkillLabel($value);
                break;
            case 9:
                $this->setSkillPluralLabel($value);
                break;
            case 10:
                $this->setSkillPictureUrl($value);
                break;
            case 11:
                $this->setGroupSlug($value);
                break;
            case 12:
                $this->setGroupLabel($value);
                break;
            case 13:
                $this->setGroupPluralLabel($value);
                break;
            case 14:
                $this->setTransitionLabel($value);
                break;
            case 15:
                $this->setTransitionPluralLabel($value);
                break;
            case 16:
                $this->setTransitionsSlug($value);
                break;
            case 17:
                $this->setPositionSlug($value);
                break;
            case 18:
                $this->setPositionLabel($value);
                break;
            case 19:
                $this->setFeatureComposition($value);
                break;
            case 20:
                $this->setFeatureTester($value);
                break;
            case 21:
                $this->setIsDefault($value);
                break;
        } // switch()

        return $this;
    }
380871
public function setAncor ( $position = null ) {
        if ( is_null($position) === true ) {
            $position = $this->_currentPosition;
        }
        $this->_ancorPosition = $position;
        return $this;
    }