PHP Trait CommerceGuys\Tax\Resolver\TaxType\StoreRegistrationCheckerTrait

Mostra file Open project: commerceguys/tax

Protected Properties

Property Type Description
$emptyAddresses CommerceGuys\Addressing\Address[] The empty addresses constructed for checking store registrations.

Protected Methods

Method Description
checkStoreRegistration ( CommerceGuys\Zone\Model\ZoneInterface $zone, Context $context ) : boolean Checks whether the store is registered to collect taxes in the given zone.
filterByStoreRegistration ( array $taxTypes, Context $context ) : CommerceGuys\Tax\Model\TaxTypeInterface[] Filters out tax types not matching the store registration.

Method Details

checkStoreRegistration() protected method

Checks whether the store is registered to collect taxes in the given zone.
protected checkStoreRegistration ( CommerceGuys\Zone\Model\ZoneInterface $zone, Context $context ) : boolean
$zone CommerceGuys\Zone\Model\ZoneInterface The zone.
$context CommerceGuys\Tax\Resolver\Context The context containing store information.
return boolean True if the store is registered to collect taxes in the given zone, false otherwise.

filterByStoreRegistration() protected method

Filters out tax types not matching the store registration.
protected filterByStoreRegistration ( array $taxTypes, Context $context ) : CommerceGuys\Tax\Model\TaxTypeInterface[]
$taxTypes array The tax types to filter.
$context CommerceGuys\Tax\Resolver\Context The context containing store information.
return CommerceGuys\Tax\Model\TaxTypeInterface[] An array of additional tax types the store is registered to collect.

Property Details

$emptyAddresses protected_oe property

The empty addresses constructed for checking store registrations.
protected Address[],CommerceGuys\Addressing $emptyAddresses
return CommerceGuys\Addressing\Address[]