ReviewAccessRepository

Implements \ReviewAccessRepositoryInterface

Class ReviewAccessRepository

category

System

package

Review

subpackage

Repositories

Methods

ReviewAccessRepository constructor.

__construct(\ReviewFactory $factory, \ReviewReaderInterface $reader) 

Arguments

$factory

\ReviewFactory

Creates with given array an reviewCustomer.

_createCustomer(array $dataSet) : \ReviewCustomer

Arguments

$dataSet

array

Response

\ReviewCustomer

Returns all review entities as array.

getAll() : \ReviewCollection

Returns the average rating by given product id.

getAverageRatingByProductId(\IdType $productId) : double

Arguments

$productId

\IdType

Response

double

Returns review entity data by the given id.

getById(\IdType $id) : \Review

Arguments

$id

\IdType

Response

\Review

Returns the reviews by given customer ID.

getReviewsByCustomerId(\IdType $customerId) : \ReviewCollection

Arguments

$customerId

\IdType

Response

\ReviewCollection

Returns the reviews by given product id.

getReviewsByProductId(\IdType $productId, \IdType $languageId) : \ReviewCollection

Arguments

$productId

\IdType

$languageId

\IdType

Response

\ReviewCollection

Properties

factory

factory : \ReviewFactory
var

Type(s)

\ReviewFactory

reader

reader : \ReviewReaderInterface