Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
PropertyCache
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 2
20
0.00% covered (danger)
0.00%
0 / 1
 clearCachedValuesByTriples
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 warmupCachedValuesByProperties
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3namespace oat\generis\Helper;
4
5use Iterator;
6
7class PropertyCache
8{
9    /**
10     * Clear property cached data
11     */
12    public static function clearCachedValuesByTriples(Iterator $triples): void
13    {
14        foreach ($triples as $triple) {
15            $classProperty = new \core_kernel_classes_Property($triple->predicate);
16            $classProperty->clearCachedValues();
17        }
18    }
19
20    /**
21     * Warmup property cached data
22     */
23    public static function warmupCachedValuesByProperties(array $properties): void
24    {
25        foreach ($properties as $property) {
26            $classProperty = new \core_kernel_classes_Property($property);
27            $classProperty->warmupCachedValues();
28        }
29    }
30}