public function init($arr = null) { if ($arr != null) { foreach ($arr as $arry) { if ($arry != null && isset($arry['text']) && $arry['name'] == 'offercode') { $this->OfferCode = $arry["text"]; } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'bmlofferinfo') { $this->BMLOfferInfo = new BMLOfferInfoType(); $this->BMLOfferInfo->init($arry["children"]); } } } } }