\AdamRocska\ShippingTier\Entity\RuntimeCarrier

Represents a shipping carrier during runtime.

Summary

Methods
Properties
Constants
__construct()
getLabel()
getIdentifier()
getShippingMethods()
getShippingMethodByIdentifier()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$label
$identifier
$shippingMethods
N/A

Properties

$label

$label : string

A human friendly / human readable label identifying the carrier.

Type

string

$identifier

$identifier : string

A computer program intended identifier identifying the carrier.

Type

string

Methods

__construct()

__construct(string  $label, string  $identifier, array<mixed,\AdamRocska\ShippingTier\Entity\ShippingMethod>  $shippingMethods) 

Carrier constructor.

Parameters

string $label

A human friendly / human readable label identifying the carrier.

string $identifier

A computer program intended identifier identifying the carrier.

array<mixed,\AdamRocska\ShippingTier\Entity\ShippingMethod> $shippingMethods

The list of individual shipping methods provided by the carrier.

getLabel()

getLabel() : string

Returns a human friendly / human readable label identifying the carrier.

Returns

string

getIdentifier()

getIdentifier() : string

Returns a computer program intended identifier identifying the carrier.

Returns

string

getShippingMethods()

getShippingMethods() : array<mixed,\AdamRocska\ShippingTier\Entity\ShippingMethod>

Returns the list of individual shipping methods provided by the carrier.

Returns

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

getShippingMethodByIdentifier()

getShippingMethodByIdentifier(string  $identifier) : \AdamRocska\ShippingTier\Entity\ShippingMethod

Returns a shipping method who's identifier matches the given one.

Parameters

string $identifier

Throws

\AdamRocska\ShippingTier\Entity\Carrier\Exception\NoShippingMethod

Throws a NoShippingMethod when no shipping method was matched against the received identifier.

Returns

\AdamRocska\ShippingTier\Entity\ShippingMethod