You are here

public function UcAddressesAddress::getField in Ubercart Addresses 6.2

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

Override of UcAddressesSchemaAddress::getField().

Getting some of the schema fields differently.

@access public

Parameters

string $fieldName: The name of the field whose value we want.

Return value

mixed The field value.

Throws

UcAddressInvalidFieldException

Overrides UcAddressesSchemaAddress::getField

File

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

Class

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

Code

public function getField($fieldName) {
  switch ($fieldName) {
    case 'aid':
      return $this
        ->getId();
    case 'uid':
      return $this
        ->getUserId();
  }
  return parent::getField($fieldName);
}