API reference / Quittio \ Core \ Tax
TaxPresetCollection
final class in quittio/core · implements Countable, IteratorAggregate
Quittio\Core\Tax\TaxPresetCollection · Source
Methods#
| Method | Description |
|---|---|
->__construct() | |
->add() | |
->alias() | Makes a preset available under a further key, e.g. the key of an earlier version that stored data still carries. has() and get() find it; iterating and count() list only the presets. |
->count() | |
->get() | |
->getIterator() | |
->has() |
__construct()#
public function __construct(iterable<TaxPreset> $presets = [])| Parameter | Type | Description |
|---|---|---|
$presets | iterable<TaxPreset> = [] |
add()#
public function add(TaxPreset $preset): self| Parameter | Type | Description |
|---|---|---|
$preset | TaxPreset |
- Returns
self
alias()#
public function alias(string $key, TaxPreset $preset): selfMakes a preset available under a further key, e.g. the key of an earlier version that stored data still carries. has() and get() find it; iterating and count() list only the presets.
| Parameter | Type | Description |
|---|---|---|
$key | string | |
$preset | TaxPreset |
- Returns
self
count()#
public function count(): int- Returns
int
get()#
public function get(string $key): TaxPreset| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
TaxPreset
getIterator()#
public function getIterator(): Traversable- Returns
Traversable
has()#
public function has(string $key): bool| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
bool