SpecialOfferMapper

Implements \SpecialOfferMapperInterface

Class SpecialOfferMapper

package

Default

Methods

SpecialOfferMapper constructor.

__construct(\SpecialOfferDataAdapterInterface $dataAdapter) 

Arguments

Maps the given data to a special offer collection.

_mapCollection(array $data) : \SpecialOfferCollection

Arguments

$data

array

Data to be mapped.

Response

\SpecialOfferCollection

Collection with mapped data.

Maps the given data to a special offer entity.

_mapSpecialOffer(array $data) : \SpecialOffer
Throws
\Exception

Arguments

$data

array

Data to be mapped.

Response

\SpecialOffer

Entity with mapped data.

Deletes the given special offer from the storage.

delete(\SpecialOfferInterface $specialOffer) : void

Arguments

$specialOffer

\SpecialOfferInterface

Special offer to be removed.

Returns all special offers.

findAll(\Pager|null $pager = null, array $sorters = array()) : \SpecialOfferCollection|null

Arguments

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\SpecialOfferCollection|null

List of special offers.

Returns all special offers that matches the given search condition.

findBy(\SpecialOfferSearchCondition $searchCondition, \Pager|null $pager = null, array $sorters = array()) : \SpecialOfferCollection|null

Arguments

$searchCondition

\SpecialOfferSearchCondition

Condition that must match for found items.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\SpecialOfferCollection|null

List of special offers by given conditions.

Returns a special offer by the given id.

findById(\SpecialOfferIdInterface $specialOfferId) : \SpecialOfferInterface|null
Throws
\Exception

Arguments

$specialOfferId

\SpecialOfferIdInterface

Id of expected special offer.

Response

\SpecialOfferInterface|null

Special offer entity by given id.

Saves the given special offer in the storage.

save(\SpecialOfferInterface $specialOffer) : \SpecialOfferInterface
Throws
\Exception

Arguments

$specialOffer

\SpecialOfferInterface

Special offer to be saved.

Response

\SpecialOfferInterface

Updates the given special offer in the storage.

update(\SpecialOfferInterface $specialOffer) : \SpecialOfferInterface
Throws
\Exception

Arguments

$specialOffer

\SpecialOfferInterface

Special offer to be updated.

Response

\SpecialOfferInterface

Properties

reader

reader : \SpecialOfferReaderInterface

writer

writer : \SpecialOfferWriterInterface