validate a position or range.


@param string $pos The position or range

@throws CK\MARCspec\Exception\InvalidMARCspecException

@return array $_pos[string] An numeric array of character or index positions.
$_pos[1] might be empty.
12466
public static function validatePos($pos)
    {
        $posLength = strlen($pos);

        if (1 > $posLength) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::PR.
                InvalidMARCspecException::PR1,
                $pos
            );
        }

        if (preg_match('/[^0-9\-#]/', $pos)) { // alphabetic characters etc. are not valid
            throw new InvalidMARCspecException(
                InvalidMARCspecException::PR.
                InvalidMARCspecException::PR2,
                $pos
            );
        }

        if (strpos($pos, '-') === $posLength - 1) { // something like 123- is not valid
            throw new InvalidMARCspecException(
                InvalidMARCspecException::PR.
                InvalidMARCspecException::PR3,
                $pos
            );
        }

        if (0 === strpos($pos, '-')) { // something like -123 ist not valid
            throw new InvalidMARCspecException(
                InvalidMARCspecException::PR.
                InvalidMARCspecException::PR4,
                $pos
            );
        }

        if (strpos($pos, '-') !== strrpos($pos, '-')) { // only one - is allowed
            throw new InvalidMARCspecException(
                InvalidMARCspecException::PR.
                InvalidMARCspecException::PR5,
                $pos
            );
        }

        $_pos = explode('-', $pos);

        if (2 < count($_pos)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::PR.
                InvalidMARCspecException::PR6,
                $pos
            );
        }

        if (1 == count($_pos)) {
            $_pos[1] = null;
        }

        return $_pos;
    }
1259942
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getPersonId();
                break;
            case 2:
                return $this->getFunctionId();
                break;
            case 3:
                return $this->getCreatedAt();
                break;
            case 4:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
1187121
public function getDescendantNodeAtPosition(int $pos) {
        foreach ($this->getChildNodes() as $child) {
            if ($child->containsPosition($pos)) {
                $node = $child->getDescendantNodeAtPosition($pos);
                if (!is_null($node)) {
                    return $node;
                }
            }
        }

        return $this;
    }
350506
protected function validatePointValue($point)
    {
        switch (true) {
            case ($point instanceof AbstractPoint):
                return $point->toArray();
                break;
            case (is_array($point) && count($point) == 2 && is_numeric($point[0]) && is_numeric($point[1])):
                return array_values($point);
                break;
            default:
                throw new InvalidValueException(sprintf('Invalid %s Point value of type "%s"', $this->getType(), (is_object($point) ? get_class($point) : gettype($point))));
        }
    }
270760
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getCreatedAt();
                break;
            case 2:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
598072
protected function parseLongForm($pos)
	{
		$pos = $this->text->indexOf($this->syntaxChar . '(', $pos);
		if ($pos === false)
		{
			return;
		}

		preg_match_all($this->longRegexp, $this->text, $matches, PREG_OFFSET_CAPTURE, $pos);
		foreach ($matches[0] as list($match, $matchPos))
		{
			$matchLen = strlen($match);

			$this->parser->addTagPair($this->tagName, $matchPos, 2, $matchPos + $matchLen - 1, 1);
			$this->text->overwrite($matchPos, $matchLen);
		}
		if (!empty($matches[0]))
		{
			$this->parseLongForm($pos);
		}
	}
676256
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getLogin();
                break;
            case 2:
                return $this->getMapuid();
                break;
            case 3:
                return $this->getScore();
                break;
            case 4:
                return $this->getCreatedAt();
                break;
            case 5:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
395782
protected function parseInput(string $native, int &$pos): Range
    {
        switch ($char = $this->nextChar($native, $pos)) {
            case '(':
            case '[':
                $pos++;
                $lowerInclusive = '[' === $char;
                break;

            case 'e':
            case 'E':
                if (preg_match('/empty/Ai', $native, $m, 0, $pos)) {
                    $pos += 5;
                    return call_user_func([$this->resultClass, 'createEmpty']);
                }
                // fall-through is intentional
            default:
                throw TypeConversionException::parsingFailed($this, '[ or (', $native, $pos);
        }

        $lower = $this->readRangeBound($native, $pos);
        $this->expectChar($native, $pos, ',');
        $upper = $this->readRangeBound($native, $pos);

        if (']' === $native[$pos]) {
            $upperInclusive = true;
            $pos++;

        } elseif (')' === $native[$pos]) {
            $upperInclusive = false;
            $pos++;

        } else {
            throw TypeConversionException::parsingFailed($this, '] or )', $native, $pos);
        }

        return new $this->resultClass(
            $this->subtypeConverter->input($lower),
            $this->subtypeConverter->input($upper),
            $lowerInclusive,
            $upperInclusive
        );
    }
1340040
private function doSeek($pos)
    {
        if ($this->limit !== -1) {
            $pos = min([$pos, $this->limit]);
        }
        $this->position = max([0, $pos]);
    }
160371
private function _getXAdvancePos($pos)
	{
		// NB Not all fonts have all marks specified in GlyphClassMarks
		// If the current glyph is not a base (but a mark) then ignore this, and apply to the current position
		if (strpos($this->GlyphClassMarks, $this->OTLdata[$pos]['hex']) !== false) {
			return $pos;
		}

		while (isset($this->OTLdata[$pos + 1]['hex']) && strpos($this->GlyphClassMarks, $this->OTLdata[$pos + 1]['hex']) !== false) {
			$pos++;
		}
		return $pos;
	}
696709
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getVisible();
                break;
            case 2:
                return $this->getCode();
                break;
            case 3:
                return $this->getTitle();
                break;
            case 4:
                return $this->getType();
                break;
            case 5:
                return $this->getEntity();
                break;
            case 6:
                return $this->getSerializedColumns();
                break;
            case 7:
                return $this->getSerializedCondition();
                break;
            case 8:
                return $this->getIndexEngineDriverConfigurationId();
                break;
            case 9:
                return $this->getCreatedAt();
                break;
            case 10:
                return $this->getUpdatedAt();
                break;
            case 11:
                return $this->getVersion();
                break;
            case 12:
                return $this->getVersionCreatedAt();
                break;
            case 13:
                return $this->getVersionCreatedBy();
                break;
            default:
                return;
                break;
        } // switch()
    }
1302312
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getType();
                break;
            case 2:
                return $this->getSkillId();
                break;
            case 3:
                return $this->getTitle();
                break;
            case 4:
                return $this->getDescendantClass();
                break;
            default:
                return null;
                break;
        } // switch()
    }
306306
public function reset($pos = null){
		
		if(\is_int($pos)){
			$this->offsetSet($pos, false);
		}
		else{
			$this->_List = ArrayList::repeat(false, $this->count());
		}
		
	}
1271359
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getCreatedAt();
                break;
            case 2:
                return $this->getUpdatedAt();
                break;
            case 3:
                return $this->getVersion();
                break;
            case 4:
                return $this->getVersionCreatedAt();
                break;
            case 5:
                return $this->getVersionCreatedBy();
                break;
            case 6:
                return $this->getPersonTeamLinkIds();
                break;
            case 7:
                return $this->getPersonTeamLinkVersions();
                break;
            default:
                return null;
                break;
        } // switch()
    }
516923
function arg($pos)
    {
        if (array_key_exists($pos, $this->parsedNamedArgs)) {
            return $this->parsedNamedArgs[$pos];
        }

        if (array_key_exists($pos, $this->parsedArgs)) {
            return $this->parsedArgs[$pos];
        }
    }
578002
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getLogin();
                break;
            case 2:
                return $this->getNickname();
                break;
            case 3:
                return $this->getNicknameStripped();
                break;
            case 4:
                return $this->getPath();
                break;
            case 5:
                return $this->getWins();
                break;
            case 6:
                return $this->getOnlineTime();
                break;
            case 7:
                return $this->getLastOnline();
                break;
            default:
                return null;
                break;
        } // switch()
    }
715246
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getSenderlogin();
                break;
            case 2:
                return $this->getReceiverlogin();
                break;
            case 3:
                return $this->getTransactionid();
                break;
            case 4:
                return $this->getBillid();
                break;
            case 5:
                return $this->getAmount();
                break;
            case 6:
                return $this->getMessage();
                break;
            case 7:
                return $this->getStatus();
                break;
            case 8:
                return $this->getDatetime();
                break;
            default:
                return null;
                break;
        } // switch()
    }