Skip to content

API reference / Quittio \ Core \ Tax

TaxPresetCollection

final class in quittio/core · implements Countable, IteratorAggregate

Quittio\Core\Tax\TaxPresetCollection · Source

Methods#

MethodDescription
->__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 = [])
ParameterTypeDescription
$presetsiterable<TaxPreset> = []

add()#

public function add(TaxPreset $preset): self
ParameterTypeDescription
$presetTaxPreset
Returns
self

alias()#

public function alias(string $key, TaxPreset $preset): self

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.

ParameterTypeDescription
$keystring
$presetTaxPreset
Returns
self

count()#

public function count(): int
Returns
int

get()#

public function get(string $key): TaxPreset
ParameterTypeDescription
$keystring
Returns
TaxPreset

getIterator()#

public function getIterator(): Traversable
Returns
Traversable

has()#

public function has(string $key): bool
ParameterTypeDescription
$keystring
Returns
bool

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.