Sets a field from the object by Position as specified in the xml schema.
Zero-based.

@param  int $pos position in xml schema
@param  mixed $value field value
@return $this|\Attogram\SharedMedia\Orm\Media
175218
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setSourceId($value);
                break;
            case 2:
                $this->setPageid($value);
                break;
            case 3:
                $this->setTitle($value);
                break;
            case 4:
                $this->setUrl($value);
                break;
            case 5:
                $this->setMime($value);
                break;
            case 6:
                $this->setWidth($value);
                break;
            case 7:
                $this->setHeight($value);
                break;
            case 8:
                $this->setSize($value);
                break;
            case 9:
                $this->setSha1($value);
                break;
            case 10:
                $this->setThumburl($value);
                break;
            case 11:
                $this->setThumbmime($value);
                break;
            case 12:
                $this->setThumbwidth($value);
                break;
            case 13:
                $this->setThumbheight($value);
                break;
            case 14:
                $this->setThumbsize($value);
                break;
            case 15:
                $this->setDescriptionurl($value);
                break;
            case 16:
                $this->setDescriptionurlshort($value);
                break;
            case 17:
                $this->setImagedescription($value);
                break;
            case 18:
                $this->setDatetimeoriginal($value);
                break;
            case 19:
                $this->setArtist($value);
                break;
            case 20:
                $this->setLicenseshortname($value);
                break;
            case 21:
                $this->setUsageterms($value);
                break;
            case 22:
                $this->setAttributionrequired($value);
                break;
            case 23:
                $this->setRestrictions($value);
                break;
            case 24:
                $this->setTimestamp($value);
                break;
            case 25:
                $this->setUser($value);
                break;
            case 26:
                $this->setUserid($value);
                break;
            case 27:
                $this->setMissing($value);
                break;
            case 28:
                $this->setKnown($value);
                break;
            case 29:
                $this->setImagerepository($value);
                break;
            case 30:
                $this->setCreatedAt($value);
                break;
            case 31:
                $this->setUpdatedAt($value);
                break;
        } // switch()

        return $this;
    }
1048255
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setTrackuid($value);
                break;
            case 2:
                $this->setGbxmapname($value);
                break;
            case 3:
                $this->setTrackid($value);
                break;
            case 4:
                $this->setUserid($value);
                break;
            case 5:
                $this->setUsername($value);
                break;
            case 6:
                $this->setUploadedat($value);
                break;
            case 7:
                $this->setUpdatedat($value);
                break;
            case 8:
                $this->setMaptype($value);
                break;
            case 9:
                $this->setTitlepack($value);
                break;
            case 10:
                $this->setStylename($value);
                break;
            case 11:
                $this->setDisplaycost($value);
                break;
            case 12:
                $this->setModname($value);
                break;
            case 13:
                $this->setLightmap($value);
                break;
            case 14:
                $this->setExeversion($value);
                break;
            case 15:
                $this->setExebuild($value);
                break;
            case 16:
                $this->setEnvironmentname($value);
                break;
            case 17:
                $this->setVehiclename($value);
                break;
            case 18:
                $this->setUnlimiterrequired($value);
                break;
            case 19:
                $this->setRoutename($value);
                break;
            case 20:
                $this->setLengthname($value);
                break;
            case 21:
                $this->setLaps($value);
                break;
            case 22:
                $this->setDifficultyname($value);
                break;
            case 23:
                $this->setReplaytypename($value);
                break;
            case 24:
                $this->setReplaywrid($value);
                break;
            case 25:
                $this->setReplaywrtime($value);
                break;
            case 26:
                $this->setReplaywruserid($value);
                break;
            case 27:
                $this->setReplaywrusername($value);
                break;
            case 28:
                $this->setRatingvotecount($value);
                break;
            case 29:
                $this->setRatingvoteaverage($value);
                break;
            case 30:
                $this->setReplaycount($value);
                break;
            case 31:
                $this->setTrackvalue($value);
                break;
            case 32:
                $this->setComments($value);
                break;
            case 33:
                $this->setCommentscount($value);
                break;
            case 34:
                $this->setAwardcount($value);
                break;
            case 35:
                $this->setHasscreenshot($value);
                break;
            case 36:
                $this->setHasthumbnail($value);
                break;
            case 37:
                $this->setHasghostblocks($value);
                break;
            case 38:
                $this->setEmbeddedobjectscount($value);
                break;
        } // switch()

        return $this;
    }
85388
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setType($value);
                break;
            case 2:
                $this->setSkillId($value);
                break;
            case 3:
                $this->setTitle($value);
                break;
            case 4:
                $this->setDescendantClass($value);
                break;
        } // switch()

        return $this;
    }
276905
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setCode($value);
                break;
            case 2:
                $this->setCreatedAt($value);
                break;
            case 3:
                $this->setUpdatedAt($value);
                break;
        } // switch()
    }
848406
public function setStatus($position, $value)
    {
        $status = pow(2, $position - 1);
        if ($value) {
            $status = $this['status'] | $status;
        } elseif ($this['status'] !== null) {
            $status = $this['status'] & ~$status;
        } else {
            $status = ~$status;
        }
        $this['status'] = $status & 0xFFFF;

        return $this;
    }
79445
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setUsername($value);
                break;
            case 2:
                $this->setPassword($value);
                break;
            case 3:
                $this->setFirstName($value);
                break;
            case 4:
                $this->setLastName($value);
                break;
            case 5:
                $this->setCreateDate($value);
                break;
            case 6:
                $this->setUpdateDate($value);
                break;
            case 7:
                $this->setStatus($value);
                break;
        } // switch()

        return $this;
    }
318346
public function setPosition( $pos )
	{
		if ( $pos == $this->getPosition() ) { return; }

		$this->_values['pos'] = (int) $pos;
		$this->setModified();
	}
409929
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setSkillId($value);
                break;
            case 2:
                $this->setAncestorId($value);
                break;
            case 3:
                $this->setPosition($value);
                break;
        } // switch()

        return $this;
    }
676777
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setTitle($value);
                break;
            case 2:
                $this->setHost($value);
                break;
            case 3:
                $this->setEndpoint($value);
                break;
            case 4:
                $this->setCreatedAt($value);
                break;
            case 5:
                $this->setUpdatedAt($value);
                break;
        } // switch()

        return $this;
    }
993694
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setUsername($value);
                break;
            case 2:
                $this->setPassword($value);
                break;
            case 3:
                $this->setSalt($value);
                break;
            case 4:
                $this->setFirstname($value);
                break;
            case 5:
                $this->setLastname($value);
                break;
            case 6:
                $this->setEmail($value);
                break;
            case 7:
                $this->setPhone($value);
                break;
            case 8:
                $this->setMemo($value);
                break;
            case 9:
                $this->setActivated($value);
                break;
            case 10:
                $this->setLastLogin($value);
                break;
            case 11:
                $this->setNotificationChange($value);
                break;
            case 12:
                $this->setNotificationError($value);
                break;
        } // switch()
    }
946378
protected function addNestedValue(string $key, $value, int $pos)
    {
        # convert the levels into an array of strings
        $levels = (strpos($key, "][") !== false)
            ? explode("][", substr($key, $pos + 1, -1))
            : [substr($key, $pos + 1, -1)];

        array_unshift($levels, substr($key, 0, $pos));

        # ensure the nesting doesn't exceed `max_nesting_levels`
        $levelLen = count($levels);
        if ($levelLen > $this->maxNestingLevels) {
            throw new DecodeException("max_input_nesting_level exceeded");
        }

        $lastKey = array_pop($levels);
        $values = &$this->values;
        foreach ($levels as $level) {
            if ($level === "") {
                $level = count($values);
            }
            if (!array_key_exists($level, $values)) {
                $values[$level] = [];
            }
            $values = &$values[$level];
        }

        if ($lastKey === "") {
            $lastKey = count($values);
        }

        \sndsgd\Arr::addValue($values, $lastKey, $value);
    }
626279
public function setPosition($posX, $posY, $posZ = null)
    {
        $this->setX($posX)
             ->setY($posY);
        if ($posZ !== null) {
            $this->setZ($posZ);
        }
        return $this;
    }
911528
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setDependencyId($value);
                break;
            case 1:
                $this->setParentId($value);
                break;
        } // switch()

        return $this;
    }
1268749
public function setRootText( $value )
    {
        $content = $this->getDependentContent();

        if ( $content )
        {
            $content->leadText = $value;
        }

        return $this;
    }
596424
public function setPostFields($value) {
        if (is_array($value)) {
            return $this->setOption(CURLOPT_POSTFIELDS, http_build_query($value));
        } else {
            return $this->setOption(CURLOPT_POSTFIELDS, $value);
        }
    }
1167852
public function set($value = null)
    {
        $this->owner->set($this->short_name, $value);

        return $this;
    }
153482
public function setPosition($position)
	{
		if ( $position == $this->getPosition() ) { return; }

		$this->_values['pos'] = (int) $position;
		$this->setModified();
	}