
| Current Path : /var/www/html/holz-machines/web/core/tests/Drupal/Tests/Core/Render/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/holz-machines/web/core/tests/Drupal/Tests/Core/Render/TestCacheableDependency.php |
<?php
namespace Drupal\Tests\Core\Render;
use Drupal\Core\Cache\CacheableDependencyInterface;
/**
* Cacheable dependency object for use in tests.
*/
class TestCacheableDependency implements CacheableDependencyInterface {
protected array $contexts;
protected array $tags;
protected $maxAge;
public function __construct(array $contexts, array $tags, $max_age) {
$this->contexts = $contexts;
$this->tags = $tags;
$this->maxAge = $max_age;
}
/**
* {@inheritdoc}
*/
public function getCacheContexts() {
return $this->contexts;
}
/**
* {@inheritdoc}
*/
public function getCacheTags() {
return $this->tags;
}
/**
* {@inheritdoc}
*/
public function getCacheMaxAge() {
return $this->maxAge;
}
}