Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
3 / 3 |
ContextCacheKeys | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
3 / 3 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getKeys | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\Core\Cache\Context\ContextCacheKeys. | |
*/ | |
namespace Drupal\Core\Cache\Context; | |
use Drupal\Core\Cache\CacheableMetadata; | |
/** | |
* A value object to store generated cache keys with its cacheability metadata. | |
*/ | |
class ContextCacheKeys extends CacheableMetadata { | |
/** | |
* The generated cache keys. | |
* | |
* @var string[] | |
*/ | |
protected $keys; | |
/** | |
* Constructs a ContextCacheKeys object. | |
* | |
* @param string[] $keys | |
* The cache context keys. | |
*/ | |
public function __construct(array $keys) { | |
$this->keys = $keys; | |
} | |
/** | |
* Gets the generated cache keys. | |
* | |
* @return string[] | |
* The cache keys. | |
*/ | |
public function getKeys() { | |
return $this->keys; | |
} | |
} |