OrderRepository

Implements \OrderRepositoryInterface

Class OrderRepository

category

System

package

Order

subpackage

Repositories

Methods

OrderRepository constructor.

__construct(\OrderFactoryInterface $orderFactory, \OrderRepositoryWriterInterface $writer, \OrderRepositoryReaderInterface $reader, \OrderRepositoryDeleterInterface $deleter, \OrderItemRepositoryInterface $orderItemRepository, \OrderTotalRepositoryInterface $orderTotalRepository, \OrderStatusHistoryReaderInterface $historyReader, \AddonValueServiceInterface $addonValueService) 

Arguments

$orderFactory

\OrderFactoryInterface

Factory to create order objects.

$writer

\OrderRepositoryWriterInterface

Order repository writer.

$reader

\OrderRepositoryReaderInterface

Order repository reader.

$deleter

\OrderRepositoryDeleterInterface

Order repository deleter.

$orderItemRepository

\OrderItemRepositoryInterface

Repository for order items.

$orderTotalRepository

\OrderTotalRepositoryInterface

Repository for order totals.

$historyReader

\OrderStatusHistoryReaderInterface

Reader for order status history items.

$addonValueService

\AddonValueServiceInterface

AddonValueService to handle the order addon values.

Creates a new order with no values in the database and returns it containing just the ID.

createNew() : \GXEngineOrder

Response

\GXEngineOrder

Crated order.

Deletes an order by the ID.

deleteById(\IdType $orderId) : \OrderRepository

Arguments

$orderId

\IdType

Order ID.

Response

\OrderRepository

Same instance for method chaining.

Returns an order by given ID.

getById(\IdType $orderId) : \GXEngineOrder

Arguments

$orderId

\IdType

Order ID.

Response

\GXEngineOrder

Fetched order.

Saves an Order to the database.

store(\OrderInterface $order) : \OrderRepository

Arguments

$order

\OrderInterface

Stored order.

Response

\OrderRepository

Same instance for method chaining.

Properties

Order factory.

orderFactory : \OrderFactoryInterface

Addon value service.

addonValueService : \AddonValueServiceInterface

Order repository writer.

writer : \OrderRepositoryWriterInterface

Order repository reader.

reader : \OrderRepositoryReaderInterface

Order repository deleter.

deleter : \OrderRepositoryDeleterInterface

Order item repository.

orderItemRepository : \OrderItemRepositoryInterface

Order total repository.

orderTotalRepository : \OrderTotalRepositoryInterface

Order status history reader.

orderStatusHistoryReader : \OrderStatusHistoryStorage