OrderRepositoryReader

Implements \OrderRepositoryReaderInterface

Class OrderRepositoryReader

category

System

package

Order

subpackage

Repositories

Methods

OrderRepositoryReader constructor.

__construct(\CI_DB_query_builder $db, \OrderFactoryInterface $orderFactory, \CountryServiceInterface $countryService, \PaymentTitleProvider $paymentTitleProvider) 

Arguments

$db

\CI_DB_query_builder

Query builder.

$orderFactory

\OrderFactoryInterface

Order factory.

$countryService

\CountryServiceInterface

Country service.

$paymentTitleProvider

\PaymentTitleProvider

Payment title provider.

Creates an order instance.

_createOrderByArray(array $data) : \GXEngineOrder

Arguments

$data

array

Order data.

Response

\GXEngineOrder

Created order object.

Creates and returns an order payment type instance by the given row data.

_createOrderPaymentType(array $row) : \OrderPaymentType
Throws
\InvalidArgumentException

Arguments

$row

array

Row array with data about the order type.

Response

\OrderPaymentType

Returns order address block instance for the customer, billing and delivery address.

_getOrderAddressBlock(array $data, \StringType $prefix) : \AddressBlock

Arguments

$data

array

Contains the order data that came directly from the database.

$prefix

\StringType

Must be one of "customers", "billing" and "delivery" (look at the "orders" db table).

Response

\AddressBlock

Instance of an address block that contains the address values.

Fetches an new order object from the orders table by the given ID.

getById(\IdType $orderId) : \GXEngineOrder
Throws
\UnexpectedValueException

If no entry has been found.

Arguments

$orderId

\IdType

ID of the expected order.

Response

\GXEngineOrder

Fetched order.

Properties

Query builder.

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

Order factory.

orderFactory : \OrderFactory
var

Type(s)

\OrderFactory

Country service.

countryService : \CountryServiceInterface

paymentTitleProvider

paymentTitleProvider : \PaymentTitleProvider
var

Type(s)

\PaymentTitleProvider