SpecialOfferWriter
in package
implements
SpecialOfferWriterInterface
Class SpecialOfferWriter
Interfaces, Classes and Traits
- SpecialOfferWriterInterface
- Interface SpecialOfferWriterInterface
Table of Contents
- $db : CI_DB_query_builder
- $productsTable : string
- $table : string
- __construct() : mixed
- SpecialOfferWriter constructor.
- delete() : void
- Deletes a special offer from the storage by the given id.
- insert() : int
- Inserts the given special offer data to a storage.
- update() : void
- Updates the given special offer data to a storage.
Properties
$db
protected
CI_DB_query_builder
$db
$productsTable
protected
string
$productsTable
= 'products'
$table
protected
string
$table
= 'specials'
Methods
__construct()
SpecialOfferWriter constructor.
public
__construct(CI_DB_query_builder $db) : mixed
Parameters
- $db : CI_DB_query_builder
Return values
mixed —delete()
Deletes a special offer from the storage by the given id.
public
delete(int $specialOfferId) : void
Parameters
- $specialOfferId : int
-
Id of special offer to be removed.
Return values
void —insert()
Inserts the given special offer data to a storage.
public
insert(array<string|int, mixed> $specialOfferData) : int
Parameters
- $specialOfferData : array<string|int, mixed>
-
Special offer data to be inserted.
Tags
Return values
int —Insert id.
update()
Updates the given special offer data to a storage.
public
update(array<string|int, mixed> $specialOfferData, int $specialOfferId) : void
Parameters
- $specialOfferData : array<string|int, mixed>
-
Special offer data to be updated.
- $specialOfferId : int
-
Id of special offer to be updated.