PHP Class Elcodi\Plugin\CustomShippingBundle\Provider\ShippingRangesProvider

Show file Open project: elcodi/bamboo Class Usage Examples

Protected Properties

Property Type Description
$carrierRepository Elcodi\Plugin\CustomShippingBundle\Repository\CarrierRepository carrierRepository
$currencyConverter Elcodi\Component\Currency\Services\CurrencyConverter currencyConverter
$zoneMatcher Elcodi\Component\Zone\Services\ZoneMatcher ZoneMatcher

Public Methods

Method Description
__construct ( Elcodi\Plugin\CustomShippingBundle\Repository\CarrierRepository $carrierRepository, Elcodi\Component\Currency\Services\CurrencyConverter $currencyConverter, Elcodi\Component\Zone\Services\ZoneMatcher $zoneMatcher ) Construct method
getAllShippingRangesSatisfiedWithCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface[] Given a Cart, return a set of ShippingRanges satisfied.

Private Methods

Method Description
getShippingRangesSatisfiedByCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\CarrierInterface $carrier ) : Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface[] Return the first Carrier's ShippingRange satisfied by a Cart.
isShippingPriceRangeSatisfiedByCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface $shippingRange ) : boolean Given ShippingPriceRange is satisfied by a cart
isShippingRangeSatisfiedByCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface $shippingRange ) : boolean Return if Carrier Range is satisfied by cart
isShippingRangeZonesSatisfiedByCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface $shippingRange ) : boolean Given ShippingRange zones are satisfied by a cart,
isShippingWeightRangeSatisfiedByCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface $shippingRange ) : boolean Given ShippingWeightRange is satisfied by a cart

Method Details

__construct() public method

Construct method
public __construct ( Elcodi\Plugin\CustomShippingBundle\Repository\CarrierRepository $carrierRepository, Elcodi\Component\Currency\Services\CurrencyConverter $currencyConverter, Elcodi\Component\Zone\Services\ZoneMatcher $zoneMatcher )
$carrierRepository Elcodi\Plugin\CustomShippingBundle\Repository\CarrierRepository Carrier Repository
$currencyConverter Elcodi\Component\Currency\Services\CurrencyConverter Currency Converter
$zoneMatcher Elcodi\Component\Zone\Services\ZoneMatcher Zone matcher

getAllShippingRangesSatisfiedWithCart() public method

Given a Cart, return a set of ShippingRanges satisfied.
public getAllShippingRangesSatisfiedWithCart ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface[]
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
return Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\ShippingRangeInterface[] Set of carriers ranges satisfied

Property Details

$carrierRepository protected property

carrierRepository
protected CarrierRepository,Elcodi\Plugin\CustomShippingBundle\Repository $carrierRepository
return Elcodi\Plugin\CustomShippingBundle\Repository\CarrierRepository

$currencyConverter protected property

currencyConverter
protected CurrencyConverter,Elcodi\Component\Currency\Services $currencyConverter
return Elcodi\Component\Currency\Services\CurrencyConverter

$zoneMatcher protected property

ZoneMatcher
protected ZoneMatcher,Elcodi\Component\Zone\Services $zoneMatcher
return Elcodi\Component\Zone\Services\ZoneMatcher