Highest_Rated
extends Collection
in package
Provides highest rated recipe posts information.
Tags
Table of Contents
Constants
- TRANSIENT_EXPIRATION_DEBUG = MINUTE_IN_SECONDS * 5
- The transient expiration for debugging.
- TRANSIENT_EXPIRATION_PRODUCTION = WEEK_IN_SECONDS
- The transient expiration for production
- TRANSIENT_KEY = 'pfic_highest_rated'
- Highest rated recipe posts transient key.
Properties
- $instances : array<string|int, object>
- The array of instances of this class and sub-classes.
- $recipe : Recipe
- The instance of the recipe class.
- $transient_expiration : int
- The transient expiration.
Methods
- get_instance() : object
- Creates and/or returns the instance of this class.
- get_post_ids() : array<string|int, int>
- Return the array of post ids for the collection.
- get_recipe_ids() : array<string|int, int>
- Return the array of recipe ids for the collection.
- rebuild_collection() : array<string|int, int>|bool
- Rebuild the transient array of highest rated recipe post ids.
- __construct() : void
- Initialise the class and set its properties.
Constants
TRANSIENT_EXPIRATION_DEBUG
The transient expiration for debugging.
protected
int
TRANSIENT_EXPIRATION_DEBUG
= MINUTE_IN_SECONDS * 5
Tags
TRANSIENT_EXPIRATION_PRODUCTION
The transient expiration for production
protected
int
TRANSIENT_EXPIRATION_PRODUCTION
= WEEK_IN_SECONDS
Tags
TRANSIENT_KEY
Highest rated recipe posts transient key.
protected
string
TRANSIENT_KEY
= 'pfic_highest_rated'
Tags
Properties
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
$recipe
The instance of the recipe class.
protected
Recipe
$recipe
Tags
$transient_expiration
The transient expiration.
protected
int
$transient_expiration
Tags
Methods
get_instance()
Creates and/or returns the instance of this class.
public
static get_instance() : object
Tags
Return values
object —The instance of this class.
get_post_ids()
Return the array of post ids for the collection.
public
get_post_ids() : array<string|int, int>
Tags
Return values
array<string|int, int> —Array of post ids.
get_recipe_ids()
Return the array of recipe ids for the collection.
public
get_recipe_ids() : array<string|int, int>
Tags
Return values
array<string|int, int> —Array of recipe ids.
rebuild_collection()
Rebuild the transient array of highest rated recipe post ids.
public
rebuild_collection() : array<string|int, int>|bool
- Return the array of post_ids.
Tags
Return values
array<string|int, int>|bool —Array of post ids or false if no data
__construct()
Initialise the class and set its properties.
protected
__construct() : void