OrderItemRepositoryReader
in package
implements
OrderItemRepositoryReaderInterface
Class OrderItemRepositoryReader
Tags
Interfaces, Classes and Traits
- OrderItemRepositoryReaderInterface
- Interface OrderItemRepositoryReaderInterface
Table of Contents
- $db : CI_DB_query_builder
- Query builder.
- $orderItemFactory : OrderItemFactoryInterface
- Order item factory.
- __construct() : mixed
- OrderItemRepositoryReader constructor.
- getItemById() : StoredOrderItemInterface
- Returns an stored order item by the given order item ID.
- getItemsByOrderId() : StoredOrderItemCollection
- Returns a collection of stored order items by the given order ID.
- _parseOrderItemDownloads() : OrderItemDownloadInformationCollection
- Parse download information of order item.
- _parseOrderItemGXCustomizerData() : OrderItemGXCustomizerDataCollection
- Parse gx customizer data of order item.
- _setDbValues() : mixed
- Assign via the setter the StoredOrderItem values.
Properties
$db
Query builder.
protected
CI_DB_query_builder
$db
$orderItemFactory
Order item factory.
protected
OrderItemFactoryInterface
$orderItemFactory
Methods
__construct()
OrderItemRepositoryReader constructor.
public
__construct(CI_DB_query_builder $db, OrderItemFactoryInterface $orderItemFactory) : mixed
Parameters
- $db : CI_DB_query_builder
-
Query builder.
- $orderItemFactory : OrderItemFactoryInterface
-
Order item factory.
Return values
mixed —getItemById()
Returns an stored order item by the given order item ID.
public
getItemById(IdType $orderItemId) : StoredOrderItemInterface
Parameters
- $orderItemId : IdType
-
ID of order item.
Tags
Return values
StoredOrderItemInterface —Fetched order item.
getItemsByOrderId()
Returns a collection of stored order items by the given order ID.
public
getItemsByOrderId(IdType $orderId) : StoredOrderItemCollection
Parameters
- $orderId : IdType
-
ID of the order.
Tags
Return values
StoredOrderItemCollection —Fetched order item collection.
_parseOrderItemDownloads()
Parse download information of order item.
protected
_parseOrderItemDownloads(array<string|int, mixed> $downloads) : OrderItemDownloadInformationCollection
Parameters
- $downloads : array<string|int, mixed>
-
Contains the records of the "orders_products_download" table that are related to the order item.
Tags
Return values
OrderItemDownloadInformationCollection —Returns a collection with the OrderItemDownload instances.
_parseOrderItemGXCustomizerData()
Parse gx customizer data of order item.
protected
_parseOrderItemGXCustomizerData(array<string|int, mixed> $gxCustomizerData) : OrderItemGXCustomizerDataCollection
Parameters
- $gxCustomizerData : array<string|int, mixed>
-
Contains the records of the "gm_gprint_orders_elements", "gm_gprint_orders_surfaces" and "gm_gprint_orders_surfaces_groups" table that are related to the order item.
Return values
OrderItemGXCustomizerDataCollection —_setDbValues()
Assign via the setter the StoredOrderItem values.
protected
_setDbValues(StoredOrderItemInterface $storedOrderItem, array<string|int, mixed> $row) : mixed
Parameters
- $storedOrderItem : StoredOrderItemInterface
- $row : array<string|int, mixed>