CoolCMS API

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

Methods

__construct()

public __construct(Container $container) : mixed
Parameters
$container : Container

getOptions()

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
bool
On this page

Search results