MediaWiki fundraising/REL1_35
DonorLocale Class Reference

Set staged language to a locale ID with country information FIXME: use BCP-47 language tags internally, and something that understands http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry to translate between tags like 'yue' and ALPHA2 'zh'. More...

Inheritance diagram for DonorLocale:
Collaboration diagram for DonorLocale:

Public Member Functions

 stage (GatewayType $adapter, $normalized, &$staged_data)
 Transform a subset of normalized data into the "staged" data expected by a payment processor.
 
 unstage (GatewayType $adapter, $stagedData, &$unstagedData)
 

Protected Member Functions

 getFallbacks ()
 In case an API can't handle certain language codes and you need to make some replacements, a subclass can override them here but returning an array with the unusable codes as keys and replacement codes as values.
 

Detailed Description

Set staged language to a locale ID with country information FIXME: use BCP-47 language tags internally, and something that understands http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry to translate between tags like 'yue' and ALPHA2 'zh'.

Definition at line 9 of file DonorLocale.php.

Member Function Documentation

◆ getFallbacks()

DonorLocale::getFallbacks ( )
protected

In case an API can't handle certain language codes and you need to make some replacements, a subclass can override them here but returning an array with the unusable codes as keys and replacement codes as values.

Returns
array

Reimplemented in IngenicoLocale.

Definition at line 46 of file DonorLocale.php.

Referenced by stage().

◆ stage()

DonorLocale::stage ( GatewayType $adapter,
$normalized,
& $stagedData )

Transform a subset of normalized data into the "staged" data expected by a payment processor.

Parameters
GatewayType$adapter
array$normalizedDonation data in normalized form.
array&$stagedDataReference to output data.

Implements StagingHelper.

Definition at line 11 of file DonorLocale.php.

References $fallback, and getFallbacks().

◆ unstage()

DonorLocale::unstage ( GatewayType $adapter,
$stagedData,
& $unstagedData )

Implements UnstagingHelper.

Definition at line 32 of file DonorLocale.php.


The documentation for this class was generated from the following file: