You are here

public function UcAddressesAddress::privSetUcAddressField in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 class/UcAddressesAddress.class.php \UcAddressesAddress::privSetUcAddressField()

Sets a private variable.

This method should only be called by the address book.

@access public

Parameters

string $fieldName: The field to set a value for.

string $value: The value to set.

Return value

void

1 call to UcAddressesAddress::privSetUcAddressField()
UcAddressesAddress::__construct in class/UcAddressesAddress.class.php
UcAddressesAddress object constructor.

File

class/UcAddressesAddress.class.php, line 591
Contains the UcAddressesAddress class.

Class

UcAddressesAddress
The main address class used by uc_addresses (and extension modules).

Code

public function privSetUcAddressField($fieldName, $value) {
  switch ($fieldName) {
    case 'name':
    case 'address_name':
      $this
        ->getSchemaAddress()->address_name = $value;
      break;
    case 'shipping':
    case 'default_shipping':
      $this
        ->getSchemaAddress()->default_shipping = $value ? TRUE : FALSE;
      break;
    case 'billing':
    case 'default_billing':
      $this
        ->getSchemaAddress()->default_billing = $value ? TRUE : FALSE;
      break;
  }
  $this
    ->setDirty();
}