Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Cache / Context / UserCacheContextBase.php
1 <?php
2
3 namespace Drupal\Core\Cache\Context;
4
5 use Drupal\Core\Session\AccountInterface;
6
7 /**
8  * Base class for user-based cache contexts.
9  *
10  * Subclasses need to implement either
11  * \Drupal\Core\Cache\Context\CacheContextInterface or
12  * \Drupal\Core\Cache\Context\CalculatedCacheContextInterface.
13  */
14 abstract class UserCacheContextBase {
15
16   /**
17    * The account object.
18    *
19    * @var \Drupal\Core\Session\AccountInterface
20    */
21   protected $user;
22
23   /**
24    * Constructs a new UserCacheContextBase class.
25    *
26    * @param \Drupal\Core\Session\AccountInterface $user
27    *   The current user.
28    */
29   public function __construct(AccountInterface $user) {
30     $this->user = $user;
31   }
32
33 }