public function UcAddressesAddressBook::getAddressByName in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 class/UcAddressesAddressBook.class.php \UcAddressesAddressBook::getAddressByName()
Get an address by it's nickname.
First, the $addresses array is searched to see if the address is already available. If it's not available, then a database request is send. If the requested address is not found or not owned by the user of the address book, an UcAddressesDbException is thrown.
@access public
Parameters
string $name: The nickname of the address.
Return value
UcAddressesAddress if the address is found. FALSE otherwise.
Throws
1 call to UcAddressesAddressBook::getAddressByName()
- UcAddressesAddressBook::deleteOne in class/
UcAddressesAddressBook.class.php - Deletes one address.
File
- class/
UcAddressesAddressBook.class.php, line 468 - Contains the UcAddressesAddressBook class.
Class
- UcAddressesAddressBook
- The address book class
Code
public function getAddressByName($name) {
$this
->loadOne(self::BY_NAME, $name);
return $this
->findByName($name);
}