From 2edfb0b3895987ca89f01c8566a76314cf576b23 Mon Sep 17 00:00:00 2001 From: Franck Allimant Date: Tue, 17 Jun 2014 00:34:57 +0200 Subject: [PATCH] Added clear method. --- core/lib/Thelia/Coupon/Type/CouponAbstract.php | 7 +++++++ core/lib/Thelia/Coupon/Type/CouponInterface.php | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/core/lib/Thelia/Coupon/Type/CouponAbstract.php b/core/lib/Thelia/Coupon/Type/CouponAbstract.php index 6d57b0d38..5a434a8cf 100644 --- a/core/lib/Thelia/Coupon/Type/CouponAbstract.php +++ b/core/lib/Thelia/Coupon/Type/CouponAbstract.php @@ -499,4 +499,11 @@ abstract class CouponAbstract implements CouponInterface return $effects; } + + /** + * @inheritdoc + */ + public function clear() { + // Does nothing. Override this function as needed. + } } diff --git a/core/lib/Thelia/Coupon/Type/CouponInterface.php b/core/lib/Thelia/Coupon/Type/CouponInterface.php index a9382749f..d8190f3d7 100644 --- a/core/lib/Thelia/Coupon/Type/CouponInterface.php +++ b/core/lib/Thelia/Coupon/Type/CouponInterface.php @@ -239,4 +239,9 @@ interface CouponInterface */ public function getEffects($data); + /** + * Clear all the data the coupon may have stored, called after an order is completed. + */ + public function clear(); + }