\AdamRocska\ShippingTier\Entity\RuntimeWildCardShippingMethodBranch

Represents a wildcard shipping method branch.

It matches as true for all hasCountry calls. Used to represent an "all other countries" in a shipping method.

Summary

Methods
Properties
Constants
__construct()
getDoorToDoorTransitTime()
getTier()
setTier()
getCountries()
hasCountry()
getShippingMethod()
setShippingMethod()
hasShippingMethod()
hasTier()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$doorToDoorTransitTime
$tier
$shippingMethod
N/A

Properties

Methods

__construct()

__construct(\AdamRocska\ShippingTier\Entity\DoorToDoorTransitTime  $doorToDoorTransitTime) 

WildCardShippingMethodBranch constructor.

Parameters

\AdamRocska\ShippingTier\Entity\DoorToDoorTransitTime $doorToDoorTransitTime

The DoorToDoorTransitionTime of the current shipping method branch.

getCountries()

getCountries() : array<mixed,\AdamRocska\ShippingTier\Entity\Country>

Returns an empty list of countries, since this is a wildcard shipping method branch. It doesn't encapsulate specific countries.

Returns

array<mixed,\AdamRocska\ShippingTier\Entity\Country>

hasCountry()

hasCountry(\AdamRocska\ShippingTier\Entity\Country  $country) : boolean

Always returns true, to fulfill its wildcard matcher role.

Comparison is done based on the encapsulated countries' and the provided country's ISO codes.

Parameters

\AdamRocska\ShippingTier\Entity\Country $country

Returns

boolean

hasShippingMethod()

hasShippingMethod() : boolean

Tells whether the current instance has a `ShippingMethod` injected.

HINT : For its dependents it's useful for catch-able, or debug assertions.

Returns

boolean

hasTier()

hasTier() : boolean

Tells whether the current instance has a `Tier` injected.

HINT : For its dependents it's useful for catch-able, or debug assertions.

Returns

boolean