WooCommerce Code Reference

Guards
in package

Table of Contents

guardAgainstInvalidAlpha2()  : void
Assert that input looks like an alpha2 key.
guardAgainstInvalidAlpha3()  : void
Assert that input looks like an alpha3 key.
guardAgainstInvalidName()  : void
Assert that input is not an empty string.
guardAgainstInvalidNumeric()  : void
Assert that input looks like a numeric key.

Methods

guardAgainstInvalidAlpha2()

Assert that input looks like an alpha2 key.

public static guardAgainstInvalidAlpha2(string $alpha2) : void
Parameters
$alpha2 : string
Tags
throws
DomainException

if input does not look like an alpha2 key

Return values
void

guardAgainstInvalidAlpha3()

Assert that input looks like an alpha3 key.

public static guardAgainstInvalidAlpha3(string $alpha3) : void
Parameters
$alpha3 : string
Tags
throws
DomainException

if input does not look like an alpha3 key

Return values
void

guardAgainstInvalidName()

Assert that input is not an empty string.

public static guardAgainstInvalidName(string $name) : void
Parameters
$name : string
Tags
throws
DomainException

if input is an empty string

Return values
void

guardAgainstInvalidNumeric()

Assert that input looks like a numeric key.

public static guardAgainstInvalidNumeric(string $numeric) : void
Parameters
$numeric : string
Tags
throws
DomainException

if input does not look like a numeric key

Return values
void