ReviewReader

Implements \ReviewReaderInterface

Class ReviewReader

category

System

package

Review

subpackage

Repositories

Methods

ReviewReader constructor.

__construct(\CI_DB_query_builder $queryBuilder) 

Arguments

$queryBuilder

\CI_DB_query_builder

_buildReviewDataArray

_buildReviewDataArray( $rawDataArray) : array

Arguments

$rawDataArray

Response

array

Returns all review entities as array.

getAll() : array

Response

array

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) : array
Throws
\EntityNotFoundException

Arguments

$id

\IdType

Response

array

Returns the reviews by given customer ID.

getReviewsByCustomerId(\IdType $customerId) : array

Arguments

$customerId

\IdType

Response

array

Returns the reviews by given product id.

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

Arguments

$productId

\IdType

$languageId

\IdType

Response

array

Properties

queryBuilder

queryBuilder : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder