|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace CS\SettingsBundle\Entity; |
| 4 | + |
| 5 | +use Doctrine\ORM\Mapping as ORM; |
| 6 | +use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
| 7 | + |
| 8 | +/** |
| 9 | + * @ORM\Table(name="app_config") |
| 10 | + * @ORM\Entity(repositoryClass="CS\SettingsBundle\Repository\SettingsRepository") |
| 11 | + * @UniqueEntity("key") |
| 12 | + */ |
| 13 | +class Setting |
| 14 | +{ |
| 15 | + /** |
| 16 | + * @ORM\Column(name="id", type="integer") |
| 17 | + * @ORM\Id |
| 18 | + * @ORM\GeneratedValue(strategy="AUTO") |
| 19 | + */ |
| 20 | + private $id; |
| 21 | + |
| 22 | + /** |
| 23 | + * @ORM\Column(name="`key`", type="string", length=125, nullable=false, unique=true) |
| 24 | + */ |
| 25 | + private $key; |
| 26 | + |
| 27 | + /** |
| 28 | + * @ORM\Column(name="`value`", type="text", nullable=true) |
| 29 | + */ |
| 30 | + private $value; |
| 31 | + |
| 32 | + /** |
| 33 | + * @ORM\Column(name="description", type="text", nullable=true) |
| 34 | + */ |
| 35 | + private $description; |
| 36 | + |
| 37 | + /** |
| 38 | + * @ORM\Column(name="section", type="string", length=125, nullable=false) |
| 39 | + */ |
| 40 | + private $section; |
| 41 | + |
| 42 | + /** |
| 43 | + * Get id |
| 44 | + * |
| 45 | + * @return integer |
| 46 | + */ |
| 47 | + public function getId() |
| 48 | + { |
| 49 | + return $this->id; |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * Get key |
| 54 | + * |
| 55 | + * @return string |
| 56 | + */ |
| 57 | + public function getKey() |
| 58 | + { |
| 59 | + return $this->key; |
| 60 | + } |
| 61 | + |
| 62 | + /** |
| 63 | + * Set key |
| 64 | + * |
| 65 | + * @param string $key |
| 66 | + * @return Setting |
| 67 | + */ |
| 68 | + public function setKey($key) |
| 69 | + { |
| 70 | + $this->key = $key; |
| 71 | + |
| 72 | + return $this; |
| 73 | + } |
| 74 | + |
| 75 | + /** |
| 76 | + * Get value |
| 77 | + * |
| 78 | + * @return string |
| 79 | + */ |
| 80 | + public function getValue() |
| 81 | + { |
| 82 | + return $this->value; |
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | + * Set value |
| 87 | + * |
| 88 | + * @param mixed $value |
| 89 | + * @return Setting |
| 90 | + */ |
| 91 | + public function setValue($value) |
| 92 | + { |
| 93 | + $this->value = $value; |
| 94 | + |
| 95 | + return $this; |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * Get description |
| 100 | + * |
| 101 | + * @return string |
| 102 | + */ |
| 103 | + public function getDescription() |
| 104 | + { |
| 105 | + return $this->description; |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * Set description |
| 110 | + * |
| 111 | + * @param string $description |
| 112 | + * @return Setting |
| 113 | + */ |
| 114 | + public function setDescription($description) |
| 115 | + { |
| 116 | + $this->description = $description; |
| 117 | + |
| 118 | + return $this; |
| 119 | + } |
| 120 | + |
| 121 | + /** |
| 122 | + * Get section |
| 123 | + * |
| 124 | + * @return string |
| 125 | + */ |
| 126 | + public function getSection() |
| 127 | + { |
| 128 | + return $this->section; |
| 129 | + } |
| 130 | + |
| 131 | + /** |
| 132 | + * Set section |
| 133 | + * |
| 134 | + * @param mixed $section |
| 135 | + * @return Setting |
| 136 | + */ |
| 137 | + public function setSection($section) |
| 138 | + { |
| 139 | + $this->section = $section; |
| 140 | + |
| 141 | + return $this; |
| 142 | + } |
| 143 | +} |
0 commit comments