SunnyCashCouponRepository
in package
implements
SunnyCashCouponRepositoryInterface
Class SunnyCashCouponRepository
Interfaces, Classes and Traits
- SunnyCashCouponRepositoryInterface
- Interface SunnyCashCouponRepositoryInterface
Table of Contents
- $cacheManager : SunnyCashCacheManagerInterface
- $couponReader : SunnyCashCouponReaderInterface
- __construct() : mixed
- SunnyCashCouponRepository constructor.
- getAllCoupons() : SunnyCashCouponCollection
- Gets all available SunnyCash coupons.
- getCouponById() : SunnyCashCoupon
- Gets a coupon by its ID.
- getCouponQuantity() : int
- Gets the total number of available SunnyCash coupons.
Properties
$cacheManager
protected
SunnyCashCacheManagerInterface
$cacheManager
$couponReader
protected
SunnyCashCouponReaderInterface
$couponReader
Methods
__construct()
SunnyCashCouponRepository constructor.
public
__construct(SunnyCashCouponReaderInterface $couponReader, SunnyCashCacheManagerInterface $cacheManager) : mixed
Parameters
- $couponReader : SunnyCashCouponReaderInterface
- $cacheManager : SunnyCashCacheManagerInterface
Return values
mixed —getAllCoupons()
Gets all available SunnyCash coupons.
public
getAllCoupons(IntType $limit, IntType $offset) : SunnyCashCouponCollection
Parameters
Return values
SunnyCashCouponCollection —getCouponById()
Gets a coupon by its ID.
public
getCouponById(IdType $id) : SunnyCashCoupon
Parameters
- $id : IdType
Return values
SunnyCashCoupon —getCouponQuantity()
Gets the total number of available SunnyCash coupons.
public
getCouponQuantity() : int