SunnyCashCouponReader
in package
implements
SunnyCashCouponReaderInterface
Class SunnyCashCouponReader
Interfaces, Classes and Traits
- SunnyCashCouponReaderInterface
- Interface SunnyCashCouponReaderInterface
Table of Contents
- $couponFactory : SunnyCashCouponFactory
- $rootDirectory : ExistingDirectory
- __construct() : mixed
- SunnyCashCouponReader constructor.
- getAllCoupons() : SunnyCashCouponCollection
- Gets all available SunnyCash coupons.
- getCouponById() : SunnyCashCoupon
- Gets a coupon by its ID.
- getCouponQuantity() : int
- Gets the total number of coupons from the cache file
- getJsonCoupons() : array<string|int, mixed>
- Fetches all coupons from a JSON cache file.
Properties
$couponFactory
protected
SunnyCashCouponFactory
$couponFactory
$rootDirectory
protected
ExistingDirectory
$rootDirectory
Methods
__construct()
SunnyCashCouponReader constructor.
public
__construct(SunnyCashCouponFactory $couponFactory, ExistingDirectory $rootDirectory) : mixed
Parameters
- $couponFactory : SunnyCashCouponFactory
- $rootDirectory : ExistingDirectory
Return values
mixed —getAllCoupons()
Gets all available SunnyCash coupons.
public
getAllCoupons(IntType $limit, IntType $offset) : SunnyCashCouponCollection
Parameters
Tags
Return values
SunnyCashCouponCollection —getCouponById()
Gets a coupon by its ID.
public
getCouponById(IdType $id) : SunnyCashCoupon
Parameters
- $id : IdType
Tags
Return values
SunnyCashCoupon —getCouponQuantity()
Gets the total number of coupons from the cache file
public
getCouponQuantity() : int
Tags
Return values
int —getJsonCoupons()
Fetches all coupons from a JSON cache file.
protected
getJsonCoupons() : array<string|int, mixed>