SpecialOfferMapper
in package
implements
SpecialOfferMapperInterface
Class SpecialOfferMapper
Interfaces, Classes and Traits
- SpecialOfferMapperInterface
- Interface SpecialOfferMapperInterface
Table of Contents
- $reader : SpecialOfferReaderInterface
- $writer : SpecialOfferWriterInterface
- __construct() : mixed
- SpecialOfferMapper constructor.
- delete() : void
- Deletes the given special offer from the storage.
- findAll() : SpecialOfferCollection|null
- Returns all special offers.
- findBy() : SpecialOfferCollection|null
- Returns all special offers that matches the given search condition.
- findById() : SpecialOfferInterface|null
- Returns a special offer by the given id.
- save() : SpecialOfferInterface
- Saves the given special offer in the storage.
- update() : SpecialOfferInterface
- Updates the given special offer in the storage.
- _mapCollection() : SpecialOfferCollection
- Maps the given data to a special offer collection.
- _mapSpecialOffer() : SpecialOffer
- Maps the given data to a special offer entity.
Properties
$reader
protected
SpecialOfferReaderInterface
$reader
$writer
protected
SpecialOfferWriterInterface
$writer
Methods
__construct()
SpecialOfferMapper constructor.
public
__construct(SpecialOfferDataAdapterInterface $dataAdapter) : mixed
Parameters
- $dataAdapter : SpecialOfferDataAdapterInterface
Return values
mixed —delete()
Deletes the given special offer from the storage.
public
delete(SpecialOfferInterface $specialOffer) : void
Parameters
- $specialOffer : SpecialOfferInterface
-
Special offer to be removed.
Return values
void —findAll()
Returns all special offers.
public
findAll([Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : SpecialOfferCollection|null
Parameters
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information
Return values
SpecialOfferCollection|null —List of special offers.
findBy()
Returns all special offers that matches the given search condition.
public
findBy(SpecialOfferSearchCondition $searchCondition[, Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : SpecialOfferCollection|null
Parameters
- $searchCondition : SpecialOfferSearchCondition
-
Condition that must match for found items.
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information
Return values
SpecialOfferCollection|null —List of special offers by given conditions.
findById()
Returns a special offer by the given id.
public
findById(SpecialOfferIdInterface $specialOfferId) : SpecialOfferInterface|null
Parameters
- $specialOfferId : SpecialOfferIdInterface
-
Id of expected special offer.
Tags
Return values
SpecialOfferInterface|null —Special offer entity by given id.
save()
Saves the given special offer in the storage.
public
save(SpecialOfferInterface $specialOffer) : SpecialOfferInterface
Parameters
- $specialOffer : SpecialOfferInterface
-
Special offer to be saved.
Tags
Return values
SpecialOfferInterface —update()
Updates the given special offer in the storage.
public
update(SpecialOfferInterface $specialOffer) : SpecialOfferInterface
Parameters
- $specialOffer : SpecialOfferInterface
-
Special offer to be updated.
Tags
Return values
SpecialOfferInterface —_mapCollection()
Maps the given data to a special offer collection.
protected
_mapCollection(array<string|int, mixed> $data) : SpecialOfferCollection
Parameters
- $data : array<string|int, mixed>
-
Data to be mapped.
Return values
SpecialOfferCollection —Collection with mapped data.
_mapSpecialOffer()
Maps the given data to a special offer entity.
protected
_mapSpecialOffer(array<string|int, mixed> $data) : SpecialOffer
Parameters
- $data : array<string|int, mixed>
-
Data to be mapped.
Tags
Return values
SpecialOffer —Entity with mapped data.