Packs a position to the mappings segment

@param \axy\sourcemap\PosMap $pos
@return string
549857
public function pack(PosMap $pos)
    {
        $generated = $pos->generated;
        $source = $pos->source;
        $offsets = [$generated->column - $this->gColumn];
        $this->gColumn = $generated->column;
        if ($source->fileIndex !== null) {
            $offsets[] = $source->fileIndex - $this->sFile;
            $offsets[] = $source->line - $this->sLine;
            $offsets[] = $source->column - $this->sColumn;
            $this->sFile = $source->fileIndex;
            $this->sLine = $source->line;
            $this->sColumn = $source->column;
            if ($source->nameIndex !== null) {
                $offsets[] = $source->nameIndex - $this->sName;
                $this->sName = $source->nameIndex;
            }
        }
        return $this->encoder->encode($offsets);
    }
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()
    }
812932
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getTrackuid();
                break;
            case 2:
                return $this->getGbxmapname();
                break;
            case 3:
                return $this->getTrackid();
                break;
            case 4:
                return $this->getUserid();
                break;
            case 5:
                return $this->getUsername();
                break;
            case 6:
                return $this->getUploadedat();
                break;
            case 7:
                return $this->getUpdatedat();
                break;
            case 8:
                return $this->getMaptype();
                break;
            case 9:
                return $this->getTitlepack();
                break;
            case 10:
                return $this->getStylename();
                break;
            case 11:
                return $this->getDisplaycost();
                break;
            case 12:
                return $this->getModname();
                break;
            case 13:
                return $this->getLightmap();
                break;
            case 14:
                return $this->getExeversion();
                break;
            case 15:
                return $this->getExebuild();
                break;
            case 16:
                return $this->getEnvironmentname();
                break;
            case 17:
                return $this->getVehiclename();
                break;
            case 18:
                return $this->getUnlimiterrequired();
                break;
            case 19:
                return $this->getRoutename();
                break;
            case 20:
                return $this->getLengthname();
                break;
            case 21:
                return $this->getLaps();
                break;
            case 22:
                return $this->getDifficultyname();
                break;
            case 23:
                return $this->getReplaytypename();
                break;
            case 24:
                return $this->getReplaywrid();
                break;
            case 25:
                return $this->getReplaywrtime();
                break;
            case 26:
                return $this->getReplaywruserid();
                break;
            case 27:
                return $this->getReplaywrusername();
                break;
            case 28:
                return $this->getRatingvotecount();
                break;
            case 29:
                return $this->getRatingvoteaverage();
                break;
            case 30:
                return $this->getReplaycount();
                break;
            case 31:
                return $this->getTrackvalue();
                break;
            case 32:
                return $this->getComments();
                break;
            case 33:
                return $this->getCommentscount();
                break;
            case 34:
                return $this->getAwardcount();
                break;
            case 35:
                return $this->getHasscreenshot();
                break;
            case 36:
                return $this->getHasthumbnail();
                break;
            case 37:
                return $this->getHasghostblocks();
                break;
            case 38:
                return $this->getEmbeddedobjectscount();
                break;
            default:
                return null;
                break;
        } // switch()
    }
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;
	}
954357
public function addPosition(PosMap $position)
    {
        $generated = $position->generated;
        $nl = $generated->line;
        if (isset($this->lines[$nl])) {
            $this->lines[$nl]->addPosition($position);
        } else {
            $this->lines[$nl] = new Line($nl, [$generated->column => $position]);
        }
        $this->sMappings = null;
    }
769059
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getDtCall();
                break;
            case 2:
                return $this->getRemoteAppId();
                break;
            case 3:
                return $this->getStatuscode();
                break;
            case 4:
                return $this->getLastResponse();
                break;
            default:
                return null;
                break;
        } // switch()
    }
609583
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setPartId($value);
                break;
            case 1:
                $this->setCompositeId($value);
                break;
        } // switch()

        return $this;
    }
1368730
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getVisible();
                break;
            case 2:
                return $this->getAddress1();
                break;
            case 3:
                return $this->getAddress2();
                break;
            case 4:
                return $this->getAddress3();
                break;
            case 5:
                return $this->getZipcode();
                break;
            case 6:
                return $this->getCity();
                break;
            case 7:
                return $this->getCountryId();
                break;
            case 8:
                return $this->getLatitude();
                break;
            case 9:
                return $this->getLongitude();
                break;
            case 10:
                return $this->getCreatedAt();
                break;
            case 11:
                return $this->getUpdatedAt();
                break;
            case 12:
                return $this->getVersion();
                break;
            case 13:
                return $this->getVersionCreatedAt();
                break;
            case 14:
                return $this->getVersionCreatedBy();
                break;
            case 15:
                return $this->getDealerShedulesIds();
                break;
            case 16:
                return $this->getDealerShedulesVersions();
                break;
            case 17:
                return $this->getDealerContactIds();
                break;
            case 18:
                return $this->getDealerContactVersions();
                break;
            case 19:
                return $this->getDealerContentIds();
                break;
            case 20:
                return $this->getDealerContentVersions();
                break;
            case 21:
                return $this->getDealerFolderIds();
                break;
            case 22:
                return $this->getDealerFolderVersions();
                break;
            case 23:
                return $this->getDealerBrandIds();
                break;
            case 24:
                return $this->getDealerBrandVersions();
                break;
            case 25:
                return $this->getDealerProductIds();
                break;
            case 26:
                return $this->getDealerProductVersions();
                break;
            case 27:
                return $this->getDealerAdminIds();
                break;
            case 28:
                return $this->getDealerAdminVersions();
                break;
            default:
                return null;
                break;
        } // switch()
    }
1030020
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;
            case 5:
                return $this->getVersion();
                break;
            case 6:
                return $this->getVersionCreatedAt();
                break;
            case 7:
                return $this->getVersionCreatedBy();
                break;
            case 8:
                return $this->getPersonIdVersion();
                break;
            case 9:
                return $this->getFunctionIdVersion();
                break;
            default:
                return null;
                break;
        } // switch()
    }
369740
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getDealerId();
                break;
            case 2:
                return $this->getDay();
                break;
            case 3:
                return $this->getBegin();
                break;
            case 4:
                return $this->getEnd();
                break;
            case 5:
                return $this->getClosed();
                break;
            case 6:
                return $this->getPeriodBegin();
                break;
            case 7:
                return $this->getPeriodEnd();
                break;
            case 8:
                return $this->getCreatedAt();
                break;
            case 9:
                return $this->getUpdatedAt();
                break;
            case 10:
                return $this->getVersion();
                break;
            case 11:
                return $this->getVersionCreatedAt();
                break;
            case 12:
                return $this->getVersionCreatedBy();
                break;
            case 13:
                return $this->getDealerIdVersion();
                break;
            default:
                return null;
                break;
        } // switch()
    }
33445
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getRemoteAppId();
                break;
            case 2:
                return $this->getApiversion();
                break;
            case 3:
                return $this->getName();
                break;
            case 4:
                return $this->getVersion();
                break;
            case 5:
                return $this->getConfigDisplayerrors();
                break;
            case 6:
                return $this->getConfigBypasscache();
                break;
            case 7:
                return $this->getConfigMinifymarkup();
                break;
            case 8:
                return $this->getConfigDebugmode();
                break;
            case 9:
                return $this->getConfigMaintenancemode();
                break;
            case 10:
                return $this->getConfigGzipscripts();
                break;
            case 11:
                return $this->getConfigRewriteurl();
                break;
            case 12:
                return $this->getConfigAdminemail();
                break;
            case 13:
                return $this->getConfigCachemode();
                break;
            case 14:
                return $this->getStatuscode();
                break;
            case 15:
                return $this->getExtensions();
                break;
            case 16:
                return $this->getLog();
                break;
            case 17:
                return $this->getPHP();
                break;
            case 18:
                return $this->getMySQL();
                break;
            default:
                return null;
                break;
        } // switch()
    }
904613
public function flip($pos = null){
		
		if(\is_int($pos)){
			$this->_List[$pos] = !$this->_List[$pos];
		}
		else{
			$this->_List = $this->_List->map(function($v){
				return !$v;
			});
		}
		
	}
201994
protected function resolvePosition($positions)
    {
        $str = '';
        foreach ($positions as $pos => $val) {
            $str .= "{$pos}: {$val}px; ";
        }

        return rtrim($str);
    }
548759
private function containsPosition(int $pos): bool {
        return $this->getStart() <= $pos && $pos <= $this->getEndPosition();
    }
834106
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getFirstName();
                break;
            case 2:
                return $this->getLastName();
                break;
            case 3:
                return $this->getCreatedAt();
                break;
            case 4:
                return $this->getUpdatedAt();
                break;
            case 5:
                return $this->getVersion();
                break;
            case 6:
                return $this->getVersionCreatedAt();
                break;
            case 7:
                return $this->getVersionCreatedBy();
                break;
            case 8:
                return $this->getPersonTeamLinkIds();
                break;
            case 9:
                return $this->getPersonTeamLinkVersions();
                break;
            case 10:
                return $this->getPersonImageIds();
                break;
            case 11:
                return $this->getPersonImageVersions();
                break;
            case 12:
                return $this->getPersonFunctionLinkIds();
                break;
            case 13:
                return $this->getPersonFunctionLinkVersions();
                break;
            default:
                return null;
                break;
        } // switch()
    }
885545
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getSourceId();
                break;
            case 2:
                return $this->getPageid();
                break;
            case 3:
                return $this->getTitle();
                break;
            case 4:
                return $this->getDisplaytitle();
                break;
            case 5:
                return $this->getPageImageFree();
                break;
            case 6:
                return $this->getWikibaseItem();
                break;
            case 7:
                return $this->getDisambiguation();
                break;
            case 8:
                return $this->getDefaultsort();
                break;
            case 9:
                return $this->getCreatedAt();
                break;
            case 10:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
1335508
private function getSourcePosition($pos)
    {
        $low = 0;
        $high = count($this->sourcePositions);

        while ($low < $high) {
            $mid = (int) (($high + $low) / 2);

            if ($pos < $this->sourcePositions[$mid]) {
                $high = $mid - 1;
                continue;
            }

            if ($pos >= $this->sourcePositions[$mid + 1]) {
                $low = $mid + 1;
                continue;
            }

            return [$mid + 1, $pos - $this->sourcePositions[$mid]];
        }

        return [$low + 1, $pos - $this->sourcePositions[$low]];
    }