OrderTotalRepositoryReader

Implements \OrderTotalRepositoryReaderInterface

Class OrderTotalRepositoryReader

category

System

package

Order

subpackage

Repositories

Methods

OrderTotalRepositoryReader constructor.

__construct(\CI_DB_query_builder $db, \OrderTotalFactoryInterface $orderTotalFactory) 

Arguments

$db

\CI_DB_query_builder

Query builder.

$orderTotalFactory

\OrderTotalFactoryInterface

Order total factory.

Creates a StoredOrderTotal instance based on the given result set array.

_createStoredOrderTotalItem(array $storedOrderTotalData) : \StoredOrderTotal

Arguments

$storedOrderTotalData

array

Result set from database.

Response

\StoredOrderTotal

Created order total.

Returns an StoredOrderTotal object by the given ID.

getTotalById(\IdType $orderTotalId) : \StoredOrderTotal
Throws
\UnexpectedValueException

If record does not exist.

Arguments

$orderTotalId

\IdType

ID of order total item.

Response

\StoredOrderTotal

Fetched order total.

Returns a StoredOrderTotalCollection of StoredOrderTotal objects by the given order ID.

getTotalsByOrderId(\IdType $orderOrderId) : \StoredOrderTotalCollection

Arguments

$orderOrderId

\IdType

ID of order item.

Response

\StoredOrderTotalCollection

Fetched order total collection.

Properties

Order total factory.

orderTotalFactory : \OrderTotalFactory
var

Type(s)

\OrderTotalFactory

Query builder.

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

Table.

table : string
var

Type(s)

string

ID column.

key : string
var

Type(s)

string