private function UcAddressesAddressBook::findByName in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 class/UcAddressesAddressBook.class.php \UcAddressesAddressBook::findByName()
Search for an address by giving the name.
@access private
Parameters
string $name: The nickname of the address.
Return value
UcAddressesAddress if address is found. FALSE otherwise.
2 calls to UcAddressesAddressBook::findByName()
- UcAddressesAddressBook::getAddressByName in class/
UcAddressesAddressBook.class.php - Get an address by it's nickname.
- UcAddressesAddressBook::loadOne in class/
UcAddressesAddressBook.class.php - Loads a single address from the database if not already loaded.
File
- class/
UcAddressesAddressBook.class.php, line 1067 - Contains the UcAddressesAddressBook class.
Class
- UcAddressesAddressBook
- The address book class
Code
private function findByName($name) {
if ($name) {
foreach ($this->addresses as $address) {
if ($address
->getName() && $address
->getName() == $name) {
return $address;
}
}
}
return FALSE;
}