Files
server/shared/lib/Resource/Range/RangeTally.php
2026-02-10 18:46:11 -05:00

82 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace KTXF\Resource\Range;
class RangeTally extends Range implements IRangeTally {
protected RangeAnchorType $anchor = RangeAnchorType::ABSOLUTE;
protected string|int $position = 0;
protected int $tally = 32;
/**
* Returns the type of the range
*
* @since 1.0.0
*/
public function type(): RangeType {
return RangeType::TALLY;
}
/**
* Gets the anchor type of the range
*
* @since 1.0.0
*/
public function getAnchor(): RangeAnchorType {
return $this->anchor;
}
/**
* Sets the anchor type of the range
*
* @since 1.0.0
*/
public function setAnchor(RangeAnchorType $value): void {
$this->anchor = $value;
}
/**
* Gets the start position of the range
*
* @since 1.0.0
*/
public function getPosition(): string|int {
return $this->position;
}
/**
* Sets the start position of the range
*
* @since 1.0.0
*/
public function setPosition(string|int $value): void {
$this->position = $value;
}
/**
* Gets the count of items in the range
*
* @since 1.0.0
*/
public function getTally(): int {
return $this->tally;
}
/**
* Sets the count of items in the range
*
* @since 1.0.0
*/
public function setTally(int $value): void {
$this->tally = $value;
}
}