CarrierRegistry
in package
FinalYes
Registry of carrier drivers, mirroring {@see \App\UI\Api\System\PaymentGateways\PaymentGatewayRegistry}.
Drivers are loaded lazily by $container->findByType(); there is no neon config, a driver
registers itself by implementing CarrierInterface (RobotLoader).
Table of Contents
Properties
- $carriers : array<string, CarrierInterface>|null
- $container : Container
Methods
- __construct() : mixed
- all() : array<string, CarrierInterface>
- get() : CarrierInterface|null
- getOptions() : array<string, string>
- Options for the admin select (`ShipperFormTrait`): `scriptName` mapped to a readable label.
- has() : bool
- loadCarriers() : array<string, CarrierInterface>
Properties
$carriers
private
array<string, CarrierInterface>|null
$carriers
= null
$container read-only
private
Container
$container
Methods
__construct()
public
__construct(Container $container) : mixed
Parameters
- $container : Container
all()
public
all() : array<string, CarrierInterface>
Return values
array<string, CarrierInterface>get()
public
get(string|null $scriptName) : CarrierInterface|null
Parameters
- $scriptName : string|null
Return values
CarrierInterface|nullgetOptions()
Options for the admin select (`ShipperFormTrait`): `scriptName` mapped to a readable label.
public
getOptions() : array<string, string>
Return values
array<string, string>has()
public
has(string $scriptName) : bool
Parameters
- $scriptName : string
Return values
boolloadCarriers()
private
loadCarriers() : array<string, CarrierInterface>