1 | <?php |
||
19 | class ResponseCache extends PageCache |
||
20 | { |
||
21 | use CacheableTrait; |
||
22 | |||
23 | /** |
||
24 | * @var array Define an array with the actions and a corresponding callable function. This will be called whether caching |
||
25 | * is enabled or not or the response is loaded from the cache. |
||
26 | * |
||
27 | * ```php |
||
28 | * 'actionsCallable' => ['get-posts' => function($result) { |
||
29 | * // do something whether is the response cached or not |
||
30 | * }); |
||
31 | * ``` |
||
32 | * @deprecated Replaced in favor of {{beforeCacheResponse}} and {{afterRestoreResponse}}. |
||
33 | */ |
||
34 | public $actionsCallable = []; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | * @deprecated Use {{$only}} or {{$except}} instead. |
||
39 | */ |
||
40 | public $actions = []; |
||
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | public function init() |
||
54 | |||
55 | /** |
||
56 | * call the action callable if available. |
||
57 | * |
||
58 | * @param string $action The action ID name |
||
59 | * @param string $result The cahed or not cached action response, this is a string as its after the action filters. |
||
60 | */ |
||
61 | private function callActionCallable($action, $result) |
||
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | public function beforeAction($action) |
||
86 | } |
||
87 |
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.