Beispiel #1
0
 /**
  * @throws Gpf_DbEngine_NoRowException
  * @throws Gpf_DbEngine_TooManyRowsException
  * @param $couponCode
  */
 protected function getCoupon($couponCode) {
     $coupon = new Pap_Db_Coupon();
     $coupon->setCode($couponCode);
     $coupon->loadFromCode();
     return $coupon;
 }
 /**
  * @throws Gpf_DbEngine_NoRowException
  * @throws Gpf_DbEngine_TooManyRowsException
  */
 private function loadCoupon(Pap_Db_Coupon $coupon) {
     try {
         $coupon->load();
         return;
     } catch (Gpf_DbEngine_NoRowException $e) {
     }
     $coupon->loadFromCode();
 }