vendor/sulu/sulu/src/Sulu/Bundle/SecurityBundle/Entity/UserSetting.php line 20

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Sulu.
  4.  *
  5.  * (c) Sulu GmbH
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  */
  10. namespace Sulu\Bundle\SecurityBundle\Entity;
  11. use JMS\Serializer\Annotation\Exclude;
  12. use Sulu\Component\Security\Authentication\UserInterface;
  13. /**
  14.  * Entry for a key-value-store like user setting.
  15.  */
  16. class UserSetting
  17. {
  18.     /**
  19.      * The value of the setting.
  20.      *
  21.      * @var string
  22.      */
  23.     private $value;
  24.     /**
  25.      * The key under which this setting is available.
  26.      *
  27.      * @var string
  28.      */
  29.     private $key;
  30.     /**
  31.      * The user for which this setting is applying.
  32.      *
  33.      * @var UserInterface
  34.      *
  35.      * @Exclude
  36.      */
  37.     private $user;
  38.     /**
  39.      * Sets the value for this user setting.
  40.      *
  41.      * @param string $value
  42.      *
  43.      * @return UserSetting
  44.      */
  45.     public function setValue($value)
  46.     {
  47.         $this->value $value;
  48.         return $this;
  49.     }
  50.     /**
  51.      * Returns the value for this user setting.
  52.      *
  53.      * @return string
  54.      */
  55.     public function getValue()
  56.     {
  57.         return $this->value;
  58.     }
  59.     /**
  60.      * Sets the key for this user setting.
  61.      *
  62.      * @param string $key
  63.      *
  64.      * @return UserSetting
  65.      */
  66.     public function setKey($key)
  67.     {
  68.         $this->key $key;
  69.         return $this;
  70.     }
  71.     /**
  72.      * Returns the key for this user setting.
  73.      *
  74.      * @return string
  75.      */
  76.     public function getKey()
  77.     {
  78.         return $this->key;
  79.     }
  80.     /**
  81.      * Sets the user for this user setting.
  82.      *
  83.      * @return UserSetting
  84.      */
  85.     public function setUser(UserInterface $user)
  86.     {
  87.         $this->user $user;
  88.         return $this;
  89.     }
  90.     /**
  91.      * Returns the user for this user setting.
  92.      *
  93.      * @return UserInterface
  94.      */
  95.     public function getUser()
  96.     {
  97.         return $this->user;
  98.     }
  99. }