Total Complexity | 3 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | abstract class AbstractQueryCacheAttribute extends AbstractQuery |
||
9 | { |
||
10 | /** |
||
11 | * Inherit cache methods. |
||
12 | */ |
||
13 | use Cacheable; |
||
14 | |||
15 | /** |
||
16 | * Target Model. |
||
17 | * |
||
18 | * @var Model |
||
19 | */ |
||
20 | protected $model; |
||
21 | |||
22 | /** |
||
23 | * Model's attribute to cache. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $attribute; |
||
28 | |||
29 | /** |
||
30 | * Model ID. |
||
31 | * |
||
32 | * @var int |
||
33 | */ |
||
34 | public $model_key; |
||
35 | |||
36 | /** |
||
37 | * QueryCacheAttribute constructor. |
||
38 | * |
||
39 | * @param int $model_key |
||
40 | */ |
||
41 | public function __construct(int $model_key) |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Retrieve a Service's title. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public function execute(): string |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Key to use for cache store. |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function cacheKey(): string |
||
68 |