SpecialOfferWriter

Implements \SpecialOfferWriterInterface

Class SpecialOfferWriter

package

Default

Methods

SpecialOfferWriter constructor.

__construct(\CI_DB_query_builder $db) 

Arguments

$db

\CI_DB_query_builder

Deletes a special offer from the storage by the given id.

delete(integer $specialOfferId) : void

Arguments

$specialOfferId

integer

Id of special offer to be removed.

Inserts the given special offer data to a storage.

insert(array $specialOfferData) : integer
Throws
\ProductForSpecialOfferNotFoundException

If product could not be found.

Arguments

$specialOfferData

array

Special offer data to be inserted.

Response

integer

Insert id.

Updates the given special offer data to a storage.

update(array $specialOfferData, integer $specialOfferId) : void

Arguments

$specialOfferData

array

Special offer data to be updated.

$specialOfferId

integer

Id of special offer to be updated.

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

table

table : string
var

Type(s)

string

productsTable

productsTable : string
var

Type(s)

string