1 | <?php |
||
25 | class ExpressionDependency extends Dependency |
||
26 | { |
||
27 | /** |
||
28 | * @var string the string representation of a PHP expression whose result is used to determine the dependency. |
||
29 | * A PHP expression can be any PHP code that evaluates to a value. To learn more about what an expression is, |
||
30 | * please refer to the [php manual](http://www.php.net/manual/en/language.expressions.php). |
||
31 | */ |
||
32 | public $expression = 'true'; |
||
33 | /** |
||
34 | * @var mixed custom parameters associated with this dependency. You may get the value |
||
35 | * of this property in [[expression]] using `$this->params`. |
||
36 | */ |
||
37 | public $params; |
||
38 | |||
39 | |||
40 | /** |
||
41 | * Generates the data needed to determine if dependency has been changed. |
||
42 | * This method returns the result of the PHP expression. |
||
43 | * @param Cache $cache the cache component that is currently evaluating this dependency |
||
44 | * @return mixed the data needed to determine if dependency has been changed. |
||
45 | */ |
||
46 | 1 | protected function generateDependencyData($cache) |
|
50 | } |
||
51 |