public function UcAddressesAddress::__wakeup in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 class/UcAddressesAddress.class.php \UcAddressesAddress::__wakeup()
Restore variables when the address is unserialized.
@access public
Return value
void
Overrides UcAddressesSchemaAddress::__wakeup
File
- class/
UcAddressesAddress.class.php, line 109 - Contains the UcAddressesAddress class.
Class
- UcAddressesAddress
- The main address class used by uc_addresses (and extension modules).
Code
public function __wakeup() {
parent::__wakeup();
$this->addressBook = UcAddressesAddressBook::get($this
->getSchemaAddress()->uid);
if ($this
->getId() <= self::$nextNewAid) {
self::$nextNewAid = $this
->getId() - 1;
}
try {
$this->addressBook
->addAddress($this);
} catch (UcAddressesException $e) {
// Ignore any exceptions.
}
}