CoolCMS API

CountryCodeList
in package

FinalYes

A stored list of ISO 3166-1 alpha-2 codes ("CZ,SK") — the delivery coverage of a shipper region (`cms_mod_eshop_shipper_regions.country_codes`). An empty list means "no restriction", so regions configured before the column existed keep working unchanged.

Table of Contents

Methods

covers()  : bool
An unknown country (address not entered yet) is not rejected — the binding check runs once the address is known.
format()  : string|null
parse()  : array<int, string>

Methods

covers()

An unknown country (address not entered yet) is not rejected — the binding check runs once the address is known.

public static covers(string|null $raw, string|null $countryCode) : bool
Parameters
$raw : string|null
$countryCode : string|null
Return values
bool

format()

public static format(iterable<string|int, mixed> $codes) : string|null
Parameters
$codes : iterable<string|int, mixed>
Return values
string|null

parse()

public static parse(string|null $raw) : array<int, string>
Parameters
$raw : string|null
Return values
array<int, string> —

unique upper-case codes, invalid tokens dropped

On this page

Search results