PHP Class yii\caching\ExpressionDependency
ExpressionDependency will use
eval() to evaluate the PHP expression.
The dependency is reported as unchanged if and only if the result of the expression is
the same as the one evaluated when storing the data to cache.
A PHP expression can be any PHP code that has a value. To learn more about what an expression is,
please refer to the
php manual.
For more details and usage information on Cache, see the
guide article on caching.
Mostra file
Open project: yiisoft/yii2
Public Properties
Property |
Type |
Description |
|
$expression |
|
the string representation of a PHP expression whose result is used to determine the dependency.
A PHP expression can be any PHP code that evaluates to a value. To learn more about what an expression is,
please refer to the php manual. |
|
$params |
|
custom parameters associated with this dependency. You may get the value
of this property in [[expression]] using $this->params. |
|
Protected Methods
Method |
Description |
|
generateDependencyData ( Cache $cache ) : mixed |
Generates the data needed to determine if dependency has been changed. |
|
Method Details
generateDependencyData()
protected method
This method returns the result of the PHP expression.
protected generateDependencyData ( Cache $cache ) : mixed |
$cache |
Cache |
the cache component that is currently evaluating this dependency |
return |
mixed |
the data needed to determine if dependency has been changed. |
Property Details
$expression public_oe property
the string representation of a PHP expression whose result is used to determine the dependency.
A PHP expression can be any PHP code that evaluates to a value. To learn more about what an expression is,
please refer to the
php manual.
$params public_oe property
custom parameters associated with this dependency. You may get the value
of this property in [[expression]] using $this->params.