Class OrderRepository

Class OrderRepository

OrderRepository implements OrderRepositoryInterface

Methods summary

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

OrderRepository constructor.

public createNew( void ) : GXEngineOrder

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

public store( OrderInterface $order ) : OrderRepository

Saves an Order to the database.

public getById( IdType $orderId ) : GXEngineOrder

Returns an order by given ID.

public deleteById( IdType $orderId ) : OrderRepository

Deletes an order by the ID.

Properties summary

protected $orderFactory : OrderFactoryInterface

Order factory.


		
protected $addonValueService : AddonValueServiceInterface

Addon value service.


		
protected $writer : OrderRepositoryWriterInterface

Order repository writer.


		
protected $reader : OrderRepositoryReaderInterface

Order repository reader.


		
protected $deleter : OrderRepositoryDeleterInterface

Order repository deleter.


		
protected $orderItemRepository : OrderItemRepositoryInterface

Order item repository.


		
protected $orderTotalRepository : OrderTotalRepositoryInterface

Order total repository.


		
protected $orderStatusHistoryReader : OrderStatusHistoryStorage

Order status history reader.