Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class CacheKey extends Action |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $item; |
||
13 | |||
14 | /** |
||
15 | * @var string|null |
||
16 | */ |
||
17 | private $identifier; |
||
18 | |||
19 | /** |
||
20 | * CacheKey constructor. |
||
21 | * |
||
22 | * @param string $item |
||
23 | * @param string|null $identifier |
||
24 | */ |
||
25 | public function __construct(string $item, string $identifier = null) |
||
26 | { |
||
27 | $this->item = $item; |
||
28 | $this->identifier = (isset($identifier) ? ':'.$identifier : ''); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Retrieve a cache key for a particular service item. |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | public function execute(): string |
||
39 | } |
||
40 | } |
||
41 |