SpecialOfferReader

Extends \AbstractDataPaginator Implements \SpecialOfferReaderInterface

package

Default

Methods

ManufacturerReader constructor.

__construct(\CI_DB_query_builder $query_builder) 
inherited

Arguments

$query_builder

\CI_DB_query_builder

Applies the class default sorting

_applyDefaultSorting() 
inherited abstract

Applies a pagination (Limit and Offset) clause to the currently building query.

_applyPagination(\Pager|null $pager = null) : $this|\ProductListProvider
inherited

Arguments

$pager

\Pager|null

(Optional) Pager object with pagination information

Response

$this|\ProductListProvider

Same instance for chained method calls.

Applies a sorting based on sorter param (if sorting is supplied) or apply default sorting.

_applySorting(array $sorters = array()) : $this|\ProductListProvider
inherited
Throws
\InvalidArgumentException

if some element of the $sorters array is not a instance of Sorter object

Arguments

$sorters

array

Array of Sorter objects.

Response

$this|\ProductListProvider

Same instance for chained method calls.

return the child class Field Map array.

_getFieldMap() : \array.
inherited abstract

Response

\array.

Parse an order by sql query into a array with fieldname and direction.

_parseOrderByString(\StringType|null $orderBy = null) : array
inherited

Arguments

$orderBy

\StringType|null

SQL order by String

Response

array

with sort information structured as ['field'=>'', 'direction'=>''].

Translate an order by sql instruction into a array of Sorter

_translateOrderByStringIntoArrayOfSorter(\StringType|null $orderBy = null) : array
inherited

Arguments

$orderBy

\StringType|null

SQL instruction with fields to sort.

Response

array

of Sorter objects.

Return the related database field of a given object(Entity) field.

_translateToDatabaseField(\string $fieldName) : \string.
inherited
Throws
\InvalidArgumentException

if the provided field name is not a valid mapped field

Arguments

$fieldName

\string

Object Field name.

Response

\string.

Parse an order by sql query into a array with fieldname and direction.

_translateToJsonFieldName(\StringType $databaseFieldName) : string|FALSE
inherited

Arguments

$databaseFieldName

\StringType

the database field name. It can be supplied as table.fieldName or fieldName.

Response

string|FALSE

will return the field name or FALSE if the field doesn't exist.

Returns all special offers.

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

Arguments

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

array|null

Raw data of special offers.

Fetches special offer data by the given condition.

fetchBy(\StringType $searchCondition, \Pager|null $pager = null, array $sorters = array()) : array|null

Arguments

$searchCondition

\StringType

Search condition for special offer data.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

array|null

Raw data of special offers.

Fetches special offer data by the given id.

fetchById(\IdType $specialOfferId) : array|null

Arguments

$specialOfferId

\IdType

Id of expected special offer data.

Response

array|null

Raw data of a special offer.

Properties

table

table : string
var

Type(s)

string

db

db : \\CI_DB_query_builder
inherited
var

Type(s)

\\CI_DB_query_builder