ModelRecipeReview
extends Model
in package
ModelRecipeReview
The model for working with the review entity.
Table of Contents
Methods
- __get() : object
- A magic method for referring to objects.
- add() : bool
- This method adds a new review.
- get() : array<string|int, mixed>
- This method returns all reviews for a specific recipe, given the query variables.
- getQuantity() : int|bool
- Returns the number of reviews for a specific post based on query variables.
Methods
__get()
A magic method for referring to objects.
public
__get(string $property) : object
Made for more convenient access to objects from the model, as well as for more convenient replacement of objects, if necessary, so that you do not have to change all calls to objects in the entire code.
Parameters
- $property : string
Return values
objectadd()
This method adds a new review.
public
add(mixed $data) : bool
Parameters
- $data : mixed
Return values
boolget()
This method returns all reviews for a specific recipe, given the query variables.
public
get([array<string|int, mixed> $query_vars = [] ]) : array<string|int, mixed>
Parameters
- $query_vars : array<string|int, mixed> = []
Return values
array<string|int, mixed>getQuantity()
Returns the number of reviews for a specific post based on query variables.
public
getQuantity([array<string|int, mixed> $query_vars = [] ]) : int|bool
Parameters
- $query_vars : array<string|int, mixed> = []