ProductRepositoryReader

Implements \ProductRepositoryReaderInterface

Class ProductRepositoryReader

category

System

package

Product

subpackage

Repositories

Methods

ProductRepositoryReader constructor.

__construct(\CI_DB_query_builder $db, \ProductFactoryInterface $productFactory, \CustomerStatusProviderInterface $customerStatusProvider) 

Arguments

$db

\CI_DB_query_builder

$productFactory

\ProductFactoryInterface

$customerStatusProvider

\CustomerStatusProviderInterface

Returns a product entity instance by the given product id.

getById(\IdType $productId) : \StoredProductInterface
Throws
\InvalidArgumentException
\UnexpectedValueException

Arguments

$productId

\IdType

Id of product entity.

Response

\StoredProductInterface

Product entity with the expected product id.

Returns the count of all product entries.

getProductsCount() : integer

Response

integer

Properties