Class craft\cache\AppPathDependency
- Inheritance
- craft\cache\AppPathDependency » yii\caching\Dependency » yii\base\BaseObject
- Implements
- yii\base\Configurable
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/cache/AppPathDependency.php
AppPathDependency is used to determine if Craft’s base path has changed.
Property | Type | Description | Defined By |
---|---|---|---|
$appPath |
string | Craft’s base path | craft\cache\AppPathDependency |
$data |
mixed | The dependency data that is saved in cache and later is compared with the latest dependency data. | yii\caching\Dependency |
$reusable |
boolean | Whether this dependency is reusable or not. | yii\caching\Dependency |
Method | Description | Defined By |
---|---|---|
__call() |
Calls the named method which is not a class method. | yii\base\BaseObject |
__construct() |
Constructor. | yii\base\BaseObject |
__get() |
Returns the value of an object property. | yii\base\BaseObject |
__isset() |
Checks if a property is set, i.e. defined and not null. | yii\base\BaseObject |
__set() |
Sets value of an object property. | yii\base\BaseObject |
__unset() |
Sets an object property to null. | yii\base\BaseObject |
canGetProperty() |
Returns a value indicating whether a property can be read. | yii\base\BaseObject |
canSetProperty() |
Returns a value indicating whether a property can be set. | yii\base\BaseObject |
className() |
Returns the fully qualified name of this class. | yii\base\BaseObject |
evaluateDependency() |
Evaluates the dependency by generating and saving the data related with dependency. | yii\caching\Dependency |
getHasChanged() |
Returns a value indicating whether the dependency has changed. | yii\caching\Dependency |
hasMethod() |
Returns a value indicating whether a method is defined. | yii\base\BaseObject |
hasProperty() |
Returns a value indicating whether a property is defined. | yii\base\BaseObject |
init() |
Initializes the object. | craft\cache\AppPathDependency |
isChanged() |
Checks whether the dependency is changed. | yii\caching\Dependency |
resetReusableData() |
Resets all cached data for reusable dependencies. | yii\caching\Dependency |
Method | Description | Defined By |
---|---|---|
generateDependencyData() |
Generates the data needed to determine if dependency has been changed. | craft\cache\AppPathDependency |
generateReusableHash() |
Generates a unique hash that can be used for retrieving reusable dependency data. | yii\caching\Dependency |
Property Details
$appPath
public property
#
Craft’s base path
public string $appPath = null
Method Details
generateDependencyData()
protected method
#
Generates the data needed to determine if dependency has been changed.
protected string generateDependencyData ( $cache )
$cache |
yii\caching\Cache | The cache component that is currently evaluating this dependency. |
return | string | The data needed to determine if dependency has been changed. |
---|
init()
public method
#
Initializes the object.
This method is invoked at the end of the constructor after the object is initialized with the given configuration.
public void init ( )