* @since 2.0.50 */ class CallbackDependency extends Dependency { /** * @var callable the PHP callback that will be called to determine if the dependency has been changed. */ public $callback; /** * Generates the data needed to determine if dependency has been changed. * This method returns the result of the callback function. * @param CacheInterface $cache the cache component that is currently evaluating this dependency * @return mixed the data needed to determine if dependency has been changed. */ protected function generateDependencyData($cache) { return ($this->callback)(); } }