Logidav Docs

ReviewsService
in package

Table of Contents

Properties

$connection  : mixed
$logService  : mixed
$reviewsApi  : mixed
$entityManager  : EntityManagerInterface

Methods

__construct()  : mixed
getRepo()  : CustomerReviewRepository
getReviewOrderTypes()  : array<string|int, mixed>|string|null
Retrieves review order types or a specific order type description if provided.
getReviewsBySourceFromApi()  : array<string|int, mixed>
Retrieves reviews from the specified source using an external API.
save()  : mixed

Properties

Methods

getReviewOrderTypes()

Retrieves review order types or a specific order type description if provided.

public static getReviewOrderTypes([string|null $orderType = null ]) : array<string|int, mixed>|string|null
Parameters
$orderType : string|null = null

The identifier of the order type to retrieve. If null, returns all order types.

Return values
array<string|int, mixed>|string|null

Returns an array of all order types if no specific type is provided. Returns the description of a specific order type if the identifier exists. Returns null if the identifier does not exist.

getReviewsBySourceFromApi()

Retrieves reviews from the specified source using an external API.

public getReviewsBySourceFromApi([int $page = 1 ][, string $source = 'menzzo.fr' ]) : array<string|int, mixed>
Parameters
$page : int = 1

The page number of the reviews to retrieve. Defaults to 1.

$source : string = 'menzzo.fr'

The source from which to fetch reviews. Defaults to 'menzzo.fr'.

Return values
array<string|int, mixed>

An array of reviews if successfully retrieved, otherwise an empty array.

save()

public save(mixed $entity) : mixed
Parameters
$entity : mixed

        
On this page

Search results