$carrier
$carrier : \AdamRocska\ShippingTier\Entity\Carrier
The carrier to which this shipping method belongs to.
Represents a runtime `ShippingMethod` entity.
$carrier : \AdamRocska\ShippingTier\Entity\Carrier
The carrier to which this shipping method belongs to.
$branches : array<mixed,\AdamRocska\ShippingTier\Entity\ShippingMethodBranch>
The list of shipping method branches encapsulated by the current shipping method.
__construct(string $label, string $identifier, array<mixed,\AdamRocska\ShippingTier\Entity\ShippingMethodBranch> $branches)
ShippingMethod constructor.
string | $label | A human friendly / human readable label identifying the shipping method. |
string | $identifier | A computer program intended identifier identifying the shipping method. |
array<mixed,\AdamRocska\ShippingTier\Entity\ShippingMethodBranch> | $branches | A list of shipping method branches encapsulated by the current shipping method. |
getCarrier() : \AdamRocska\ShippingTier\Entity\Carrier
Returns the `Carrier` to which this shipping method belongs to.
Carrier
s are lazily injected into this instance, therefore in order to
avoid runtime type related failures, make sure to test / assert /
validate a tier's presence via hasCarrier
.
setCarrier(\AdamRocska\ShippingTier\Entity\Carrier $carrier)
Sets the carrier to which this shipping method belongs to.
\AdamRocska\ShippingTier\Entity\Carrier | $carrier |
getBranches() : array<mixed,\AdamRocska\ShippingTier\Entity\ShippingMethodBranch>
Returns the list of `ShippingMethodBranch`es belonging to this shipping method.