MediaWiki fundraising/REL1_35
DonorFullName.php
Go to the documentation of this file.
1<?php
2
3class DonorFullName implements StagingHelper {
11 public function stage( GatewayType $adapter, $normalized, &$stagedData ) {
12 $name_parts = [];
13 if ( isset( $normalized['first_name'] ) ) {
14 $name_parts[] = $normalized['first_name'];
15 }
16 if ( isset( $normalized['last_name'] ) ) {
17 $name_parts[] = $normalized['last_name'];
18 }
19 $stagedData['full_name'] = implode( ' ', $name_parts );
20 }
21}
stage(GatewayType $adapter, $normalized, &$stagedData)
Seems more sane to do it this way than provide a single input box and try to parse out first_name and...
GatewayType Interface.
Used to mark any class which implements an staging method, for transforming data into the form expect...