class BaseTaxType

Methods

number
pricePercentRetriever()

For a price percent tax type, return the percentage (e.g. 20 for 20%) of the product price to use in tax calculation.

number
fixAmountRetriever( Product $product)

For constant amount tax type, return the absolute amount to use in tax calculation.

array
getRequirementsDefinition()

Returns the requirements definition of this tax type. This is an array of TaxTypeRequirementDefinition, which defines the name and the type of the requirements. Example :

the
getTitle()

No description

calculate( Product $product, $untaxedPrice)

No description

array
getRequirements()

No description

loadRequirements($requirementsValues)

No description

setRequirement($key, $value)

No description

getRequirement($key)

No description

Details

at line 40
number pricePercentRetriever()

For a price percent tax type, return the percentage (e.g. 20 for 20%) of the product price to use in tax calculation.

For other tax types, this method shoud return 0.

Return Value

number

at line 52
number fixAmountRetriever( Product $product)

For constant amount tax type, return the absolute amount to use in tax calculation.

For other tax types, this method shoud return 0.

Parameters

Product $product

Return Value

number

at line 68
array getRequirementsDefinition()

Returns the requirements definition of this tax type. This is an array of TaxTypeRequirementDefinition, which defines the name and the type of the requirements. Example :

array( 'percent' => new FloatType() );

Return Value

array of TaxTypeRequirementDefinition

at line 76
abstract the getTitle()

Return Value

the name of this tax type.

at line 78
calculate( Product $product, $untaxedPrice)

Parameters

Product $product
$untaxedPrice

at line 87
array getRequirements()

Return Value

array Return the requirements array.

Exceptions

TaxEngineException

at line 92
loadRequirements($requirementsValues)

Parameters

$requirementsValues

at line 115
setRequirement($key, $value)

Parameters

$key
$value

at line 122
getRequirement($key)

Parameters

$key