/** * Check - this and specified addresses is equal or not * * @param \XLite\Model\Base\Address $address Address * * @return boolean */ public function isEqualAddress(\XLite\Model\Base\Address $address) { $my = $this->getFieldsHash(); $strange = $address->getFieldsHash(); $intersect = array_intersect_assoc($my, $strange); return count($intersect) == count($my) && count($intersect) == count($strange); }
/** * Get address fields list * * @return array(string) */ public static function getAddressFields() { return array_merge(array('firstname', 'lastname'), parent::getAddressFields()); }