private function UcAddressesAddressBook::loadAll in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 class/UcAddressesAddressBook.class.php \UcAddressesAddressBook::loadAll()
Loads all addresses from database when they not already loaded.
@access private
Return value
void
7 calls to UcAddressesAddressBook::loadAll()
- UcAddressesAddressBook::addAddress in class/
UcAddressesAddressBook.class.php - Adds address to address book.
- UcAddressesAddressBook::compareAddress in class/
UcAddressesAddressBook.class.php - Checks if given address looks like an address already in the address book.
- UcAddressesAddressBook::getAddresses in class/
UcAddressesAddressBook.class.php - Returns all addresses of the user.
- UcAddressesAddressBook::loadDefaults in class/
UcAddressesAddressBook.class.php - Loads all addresses from database when they not already loaded.
- UcAddressesAddressBook::loadOne in class/
UcAddressesAddressBook.class.php - Loads a single address from the database if not already loaded.
File
- class/
UcAddressesAddressBook.class.php, line 891 - Contains the UcAddressesAddressBook class.
Class
- UcAddressesAddressBook
- The address book class
Code
private function loadAll() {
// Reason to skip out early.
if ($this->allLoaded) {
return;
}
if (!$this
->isOwned()) {
return;
}
// Update the performance hint setting.
$this->performanceHint = self::PERF_HINT_LOAD_ALL;
// Get all addresses for this user.
$result = db_select('uc_addresses')
->condition('uid', $this->uid)
->fields('uc_addresses')
->orderBy('created', 'ASC')
->execute();
// Set flag that all addresses are loaded.
$this->allLoaded = TRUE;
// Set flag that default addresses are loaded.
$this->defaultsLoaded = TRUE;
$this
->dbResultToAddresses($result);
}