Extra information generated during the analysis by calculable elements.
More...
|
static | pull_info (array $predictionrecords) |
| Pulls the info related to the provided records out from the cache. More...
|
|
Extra information generated during the analysis by calculable elements.
The main purpose of this request cache is to allow calculable elements to store data during their calculations for further use at a later stage efficiently.
- Copyright
- 2019 David Monllao
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ add_shared()
core_analytics\calculation_info::add_shared |
( |
int |
$sampleid, |
|
|
array |
$info |
|
) |
| |
Adds info related to the current calculation for later use when generating insights.
Note that the data in $info array is reused across multiple samples, if you want to add data just for this sample you can use the sample id as key.
We store two different arrays so objects that appear multiple times for different samples appear just once in memory.
- Parameters
-
int | $sampleid | The sample id this data is associated with |
array | $info | The data. Indexed by an id unique across the site. E.g. an activity id. |
- Return values
-
◆ pull_info()
static core_analytics\calculation_info::pull_info |
( |
array |
$predictionrecords | ) |
|
|
static |
Pulls the info related to the provided records out from the cache.
Note that this function purges 'calculablesinfo' cache.
- Parameters
-
stdClass[] | $predictionrecords | |
- Return values
-
◆ save()
Stores in MUC the previously added data and it associates it to the provided $calculable.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file: