SunnyCashCouponFactory
in package
Class SunnyCashCouponFactory
Tags
Table of Contents
- $couponCodeReader : SunnyCashCouponCodeReaderInterface
- $logoStorageWriter : SunnyCashLogoStorageWriterInterface
- __construct() : mixed
- SunnyCashCouponFactory constructor.
- createCollectionFromArray() : SunnyCashCouponCollection
- Creates a collection of coupon instances.
- createFromJson() : SunnyCashCoupon
- Creates a coupon instance from JSON decoded coupon data.
Properties
$couponCodeReader
protected
SunnyCashCouponCodeReaderInterface
$couponCodeReader
$logoStorageWriter
protected
SunnyCashLogoStorageWriterInterface
$logoStorageWriter
Methods
__construct()
SunnyCashCouponFactory constructor.
public
__construct(SunnyCashLogoStorageWriterInterface $logoStorageWriter, SunnyCashCouponCodeReaderInterface $couponCodeReader) : mixed
Parameters
- $logoStorageWriter : SunnyCashLogoStorageWriterInterface
- $couponCodeReader : SunnyCashCouponCodeReaderInterface
Return values
mixed —createCollectionFromArray()
Creates a collection of coupon instances.
public
createCollectionFromArray(array<string|int, mixed> $couponArray) : SunnyCashCouponCollection
Parameters
- $couponArray : array<string|int, mixed>
Return values
SunnyCashCouponCollection —createFromJson()
Creates a coupon instance from JSON decoded coupon data.
public
createFromJson(stdClass $coupon) : SunnyCashCoupon
Parameters
- $coupon : stdClass