Example #1
0
 protected function depInit()
 {
     if (!$this->_nonAssume) {
         if ($this->currency != 'PLN') {
             $this->_modifier = new Logic_Modifier_Item_Currency_External_BaseInterest($this->brandId, $this->currency, $this->customerTypeId, $this->depositDays, $this->depositAmount, $this->counterOfferNo);
             //   $modifier1 = new Logic_Modifier_Item_Currency_AddOns_CounterOffer($this->counterOfferNo);\
             //  $this->_modifier
             //          ->nextModifier($modifier1);\
             //    return null;
         } else {
             $customer = $this->customer->getCustomerData();
             $customerEngagement = empty($customer['engagement']) ? 0.0 : $customer['engagement'];
             $modifier1 = new Logic_Modifier_Item_External_WiborIrs($this->depositDays, $this->currency);
             $modifier2 = new Logic_Modifier_Item_AddOns_Brand($this->customerTypeId, $this->brandId);
             $modifier3 = new Logic_Modifier_Item_AddOns_CustomerEngagement($this->customerTypeId, $this->brandId, $customerEngagement);
             $modifier4 = new Logic_Modifier_Item_AddOns_DepositAmount($this->customerTypeId, $this->brandId, $this->depositAmount);
             $modifier5 = new Logic_Modifier_Item_AddOns_DepositPeriod($this->customerTypeId, $this->brandId, $this->depositDays);
             $modifier6 = new Logic_Modifier_Item_AddOns_NewOldMoney($this->customerTypeId, $this->brandId, $this->newMoney);
             $modifier7 = new Logic_Modifier_Item_AddOns_CounterOffer($this->counterOfferNo, $this->customerTypeId);
             $modifier8 = new Logic_Modifier_Item_Expectance($this->customerExpectance);
             $baseModifier = new Logic_Modifier_Item_External_BaseInterest($this->depositDays);
             $this->_modifier = $baseModifier;
             $this->_modifier->nextModifier($modifier1)->nextModifier($modifier2)->nextModifier($modifier3)->nextModifier($modifier4)->nextModifier($modifier5)->nextModifier($modifier6)->nextModifier($modifier7)->nextModifier($modifier8);
         }
     }
 }
Example #2
0
 public function setupLogicCustomer()
 {
     $cache = $this->getResource('cachemanager')->getCache('customerdata');
     Logic_Customer::setCache($cache);
 }
Example #3
0
 public function deftestAction()
 {
     $start = microtime();
     $isResident = false;
     $findData = array('firstname' => 'GEORG', 'surname' => 'BADURA', 'is_resident' => $isResident ? 't' : 'f', 'identity_document_type' => '9', 'identity_document_number' => 'D5009999999', 'pesel' => '87080808294');
     try {
         $customer = Logic_Customer::findOrCreate($findData);
     } catch (Exception $e) {
         diee($e->getMessage());
     }
     echo microtime() - $start;
     diee($customer);
 }
Example #4
0
 public static function setCache(Zend_Cache_Core $cache)
 {
     self::$_cache = $cache;
 }