Get the count of components in current position

@param string $pos template position
@return int count of components in current position
499385
public function countcomponents($pos){
		return isset($this->positions[$pos])?count($this->positions[$pos]):0;
		}
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;
    }
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;
    }
218608
public function count($type, $pos)
    {
        return empty($this->assets[$type][$pos]) ? 0 : count($this->assets[$type][$pos]);
    }
67949
public function mapPos($pos){
       
        foreach ($this->snippets as $k => $v){
            $pos += $k;
            if($pos < $k + strlen($v)){
                break;
            }
            $pos -= ($k + strlen($v));
            
        }
        return $pos;
    }
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];
        }
    }
1134779
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getTitle();
                break;
            case 2:
                return $this->getSlug();
                break;
            case 3:
                return $this->getSportId();
                break;
            case 4:
                return $this->getDescription();
                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()
    }
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()
    }
909640
public function getNextWeight($type, $pos)
    {
        $step = 20;
        $count = $this->count($type, $pos);
        return $count * $step + $step;
    }
340954
public function getArg($pos = null)
    {
        if ($pos === null) {
            return $this->args;
        }

        return isset($this->args[$pos]) ? $this->args[$pos] : $this->args;
    }
935259
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getType();
                break;
            case 2:
                return $this->getTitle();
                break;
            case 3:
                return $this->getYear();
                break;
            case 4:
                return $this->getPublisher();
                break;
            case 5:
                return $this->getJournal();
                break;
            case 6:
                return $this->getNumber();
                break;
            case 7:
                return $this->getSchool();
                break;
            case 8:
                return $this->getAuthor();
                break;
            case 9:
                return $this->getEdition();
                break;
            case 10:
                return $this->getVolume();
                break;
            case 11:
                return $this->getAddress();
                break;
            case 12:
                return $this->getEditor();
                break;
            case 13:
                return $this->getHowpublished();
                break;
            case 14:
                return $this->getNote();
                break;
            case 15:
                return $this->getBooktitle();
                break;
            case 16:
                return $this->getPages();
                break;
            case 17:
                return $this->getUrl();
                break;
            case 18:
                return $this->getLastchecked();
                break;
            case 19:
                return $this->getManaged();
                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]];
    }
754948
public function skipSpacesBack($pos, $min)
    {
        
        if ($pos <= $min) { return $pos; }

        while ($pos > $min) {
            if (!$this->md->utils->isSpace($this->src[--$pos])) { return $pos + 1; }
        }
        return $pos;
    }
42787
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getName();
                break;
            case 2:
                return $this->getRole();
                break;
            default:
                return null;
                break;
        } // switch()
    }
309340
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getMapuid();
                break;
            case 2:
                return $this->getNblaps();
                break;
            case 3:
                return $this->getScore();
                break;
            case 4:
                return $this->getNbfinish();
                break;
            case 5:
                return $this->getAvgscore();
                break;
            case 6:
                return $this->getCheckpoints();
                break;
            case 7:
                return $this->getPlayerId();
                break;
            case 8:
                return $this->getCreatedAt();
                break;
            case 9:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
231141
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getType();
                break;
            case 2:
                return $this->getName();
                break;
            case 3:
                return $this->getDomain();
                break;
            case 4:
                return $this->getApiUrl();
                break;
            case 5:
                return $this->getApiAuthHttpUser();
                break;
            case 6:
                return $this->getApiAuthHttpPassword();
                break;
            case 7:
                return $this->getApiAuthType();
                break;
            case 8:
                return $this->getApiAuthUser();
                break;
            case 9:
                return $this->getApiAuthPassword();
                break;
            case 10:
                return $this->getApiAuthToken();
                break;
            case 11:
                return $this->getApiAuthUrlUserKey();
                break;
            case 12:
                return $this->getApiAuthUrlPwKey();
                break;
            case 13:
                return $this->getCron();
                break;
            case 14:
                return $this->getCustomerId();
                break;
            case 15:
                return $this->getActivated();
                break;
            case 16:
                return $this->getNotes();
                break;
            case 17:
                return $this->getLastRun();
                break;
            case 18:
                return $this->getIncludelog();
                break;
            case 19:
                return $this->getPublicKey();
                break;
            case 20:
                return $this->getWebsiteHash();
                break;
            case 21:
                return $this->getNotificationRecipient();
                break;
            case 22:
                return $this->getNotificationSender();
                break;
            case 23:
                return $this->getNotificationChange();
                break;
            case 24:
                return $this->getNotificationError();
                break;
            default:
                return null;
                break;
        } // switch()
    }