1 | <?php |
||
22 | class ChainedDependency extends Dependency |
||
23 | { |
||
24 | /** |
||
25 | * @var Dependency[] list of dependencies that this dependency is composed of. |
||
26 | * Each array element must be a dependency object. |
||
27 | */ |
||
28 | public $dependencies = []; |
||
29 | /** |
||
30 | * @var bool whether this dependency is depending on every dependency in [[dependencies]]. |
||
31 | * Defaults to true, meaning if any of the dependencies has changed, this dependency is considered changed. |
||
32 | * When it is set false, it means if one of the dependencies has NOT changed, this dependency |
||
33 | * is considered NOT changed. |
||
34 | */ |
||
35 | public $dependOnAll = true; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Evaluates the dependency by generating and saving the data related with dependency. |
||
40 | * @param Cache $cache the cache component that is currently evaluating this dependency |
||
41 | */ |
||
42 | public function evaluateDependency($cache) |
||
48 | |||
49 | /** |
||
50 | * Generates the data needed to determine if dependency has been changed. |
||
51 | * This method does nothing in this class. |
||
52 | * @param Cache $cache the cache component that is currently evaluating this dependency |
||
53 | * @return mixed the data needed to determine if dependency has been changed. |
||
54 | */ |
||
55 | protected function generateDependencyData($cache) |
||
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | */ |
||
63 | public function isChanged($cache) |
||
74 | } |
||
75 |