Mage_Customer_Model_Address Class Reference

Inheritance diagram for Mage_Customer_Model_Address:

Mage_Customer_Model_Address_Abstract Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 getCustomerId ()
 setCustomerId ($id)
 getCustomer ()
 delete ()
 getAttributes ()
 __clone ()

Protected Member Functions

 _construct ()

Protected Attributes

 $_customer


Detailed Description

Definition at line 34 of file Address.php.


Member Function Documentation

__clone (  ) 

Definition at line 111 of file Address.php.

00112     {
00113         $this->setId(null);
00114     }

_construct (  )  [protected]

Enter description here...

Reimplemented from Varien_Object.

Definition at line 38 of file Address.php.

00039     {
00040         $this->_init('customer/address');
00041     }

delete (  ) 

Delete customer address

Returns:
Mage_Customer_Model_Address

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 87 of file Address.php.

00088     {
00089         $this->_getResource()->delete($this);
00090         $this->setData(array());
00091         return $this;
00092     }

getAttributes (  ) 

Retrieve address entity attributes

Returns:
array

Definition at line 99 of file Address.php.

00100     {
00101         $attributes = $this->getData('attributes');
00102         if (is_null($attributes)) {
00103             $attributes = $this->_getResource()
00104                 ->loadAllAttributes($this)
00105                 ->getSortedAttributes();
00106             $this->setData('attributes', $attributes);
00107         }
00108         return $attributes;
00109     }

getCustomer (  ) 

Retrieve address customer

Returns:
Mage_Customer_Model_Customer | false

Definition at line 70 of file Address.php.

00071     {
00072         if (!$this->getCustomerId()) {
00073             return false;
00074         }
00075         if (empty($this->_customer)) {
00076             $this->_customer = Mage::getModel('customer/customer')
00077                 ->load($this->getCustomerId());
00078         }
00079         return $this->_customer;
00080     }

getCustomerId (  ) 

Retrieve address customer identifier

Returns:
int

Definition at line 48 of file Address.php.

00049     {
00050         return $this->_getResource()->getCustomerId($this);
00051     }

setCustomerId ( id  ) 

Declare address customer identifier

Parameters:
unknown_type $id
Returns:
unknown

Definition at line 59 of file Address.php.

00060     {
00061         $this->_getResource()->setCustomerId($this, $id);
00062         return $this;
00063     }


Member Data Documentation

$_customer [protected]

Definition at line 36 of file Address.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:03 2009 for Magento by  doxygen 1.5.8