MediaWiki fundraising/REL1_35
EncodingMangler Class Reference

Wikimedia Foundation. More...

Inheritance diagram for EncodingMangler:
Collaboration diagram for EncodingMangler:

Public Member Functions

 __construct ()
 
 stage (GatewayType $adapter, $normalized, &$stagedData)
 Transform a subset of normalized data into the "staged" data expected by a payment processor.
 
 transliterate ( $value)
 Forces string into ISO-8859-1 space.
 

Protected Attributes

 $transliterator
 
 $use_transliterator = false
 

Detailed Description

Wikimedia Foundation.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Forces the languages of the world to fit into a teensy little codespace so we can send them in ISO-8859-1 encoding. Uses Transliterator if available to turn non-latin characters into something meaningful. If not available, iconv will just replace em with question marks

Definition at line 25 of file EncodingMangler.php.

Constructor & Destructor Documentation

◆ __construct()

EncodingMangler::__construct ( )

Definition at line 29 of file EncodingMangler.php.

Member Function Documentation

◆ stage()

EncodingMangler::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 38 of file EncodingMangler.php.

References transliterate().

◆ transliterate()

EncodingMangler::transliterate ( $value)

Forces string into ISO-8859-1 space.

Parameters
string$valueUTF-8
Returns
string still UTF-8, but only includes chars from 00-ff

Definition at line 50 of file EncodingMangler.php.

Referenced by stage().

Member Data Documentation

◆ $transliterator

EncodingMangler::$transliterator
protected

Definition at line 27 of file EncodingMangler.php.

◆ $use_transliterator

EncodingMangler::$use_transliterator = false
protected

Definition at line 26 of file EncodingMangler.php.


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