/** * Fills the order address object with the values from the array. * * @param MShop_Order_Item_Base_Address_Interface $address Address item to store the values into * @param array $map Associative array of key/value pairs. The keys must be the same as when calling toArray() from * an address item. * @throws Controller_Frontend_Basket_Exception */ protected function _setAddressFromArray(MShop_Order_Item_Base_Address_Interface $address, array $map) { foreach ($map as $key => $value) { $map[$key] = strip_tags($value); // prevent XSS } $errors = $address->fromArray($map); if (count($errors) > 0) { $msg = sprintf('Invalid address properties, please check your input'); throw new Controller_Frontend_Basket_Exception($msg, 0, null, $errors); } }