PHP Interface Sonata\Component\Product\PriceComputableInterface

This interface describes required fields for price computation
Author: Vincent Composieux ([email protected])
Afficher le fichier Open project: sonata-project/ecommerce

Méthodes publiques

Méthode Description
getPrice ( boolean $vat = false ) : float Returns price of the element (including quantity).
getQuantity ( ) : integer Gets quantity.
getUnitPrice ( boolean $vat = false ) : float Returns the unit price.
getVatRate ( ) : float Gets VAT rate.
setPrice ( float $price ) Sets price.
setQuantity ( integer $quantity ) Sets quantity.
setVatRate ( float $vatRate ) Sets VAT rate.

Method Details

getPrice() public méthode

Returns price of the element (including quantity).
public getPrice ( boolean $vat = false ) : float
$vat boolean
Résultat float

getQuantity() public méthode

Gets quantity.
public getQuantity ( ) : integer
Résultat integer $quantity

getUnitPrice() public méthode

if $vat = true, returns the unit price with vat
public getUnitPrice ( boolean $vat = false ) : float
$vat boolean
Résultat float

getVatRate() public méthode

Gets VAT rate.
public getVatRate ( ) : float
Résultat float

setPrice() public méthode

Sets price.
public setPrice ( float $price )
$price float

setQuantity() public méthode

Sets quantity.
public setQuantity ( integer $quantity )
$quantity integer

setVatRate() public méthode

Sets VAT rate.
public setVatRate ( float $vatRate )
$vatRate float