]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/WallabagBundle/Entity/Entries.php
toggle archive / fav actions
[github/wallabag/wallabag.git] / src / WallabagBundle / Entity / Entries.php
CommitLineData
9d50517c
NL
1<?php
2
3namespace WallabagBundle\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6
7/**
8 * Entries
9 *
10 * @ORM\Entity(repositoryClass="WallabagBundle\Repository\EntriesRepository")
11 * @ORM\Table(name="entries")
12 */
13class Entries
14{
15 /**
16 * @var integer
17 *
18 * @ORM\Column(name="id", type="integer", nullable=true)
19 * @ORM\Id
20 * @ORM\GeneratedValue(strategy="IDENTITY")
21 */
22 private $id;
23
24 /**
25 * @var string
26 *
27 * @ORM\Column(name="title", type="text", nullable=true)
28 */
29 private $title;
30
31 /**
32 * @var string
33 *
34 * @ORM\Column(name="url", type="text", nullable=true)
35 */
36 private $url;
37
38 /**
39 * @var string
40 *
41 * @ORM\Column(name="is_read", type="decimal", precision=10, scale=0, nullable=true)
42 */
43 private $isRead = '0';
44
45 /**
46 * @var string
47 *
48 * @ORM\Column(name="is_fav", type="decimal", precision=10, scale=0, nullable=true)
49 */
50 private $isFav = '0';
51
52 /**
53 * @var string
54 *
55 * @ORM\Column(name="content", type="text", nullable=true)
56 */
57 private $content;
58
59 /**
60 * @var string
61 *
62 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
63 */
64 private $userId;
65
66
67
68 /**
69 * Get id
70 *
71 * @return integer
72 */
73 public function getId()
74 {
75 return $this->id;
76 }
77
78 /**
79 * Set title
80 *
81 * @param string $title
82 * @return Entries
83 */
84 public function setTitle($title)
85 {
86 $this->title = $title;
87
88 return $this;
89 }
90
91 /**
92 * Get title
93 *
94 * @return string
95 */
96 public function getTitle()
97 {
98 return $this->title;
99 }
100
101 /**
102 * Set url
103 *
104 * @param string $url
105 * @return Entries
106 */
107 public function setUrl($url)
108 {
109 $this->url = $url;
110
111 return $this;
112 }
113
114 /**
115 * Get url
116 *
117 * @return string
118 */
119 public function getUrl()
120 {
121 return $this->url;
122 }
123
124 /**
125 * Set isRead
126 *
127 * @param string $isRead
128 * @return Entries
129 */
130 public function setIsRead($isRead)
131 {
132 $this->isRead = $isRead;
133
134 return $this;
135 }
136
137 /**
138 * Get isRead
139 *
140 * @return string
141 */
142 public function getIsRead()
143 {
144 return $this->isRead;
145 }
146
163eae0b
NL
147 public function toggleArchive()
148 {
149 $this->isRead = $this->getIsRead() ^ 1;
150 return $this;
151 }
152
9d50517c
NL
153 /**
154 * Set isFav
155 *
156 * @param string $isFav
157 * @return Entries
158 */
159 public function setIsFav($isFav)
160 {
161 $this->isFav = $isFav;
162
163 return $this;
164 }
165
166 /**
167 * Get isFav
168 *
169 * @return string
170 */
171 public function getIsFav()
172 {
173 return $this->isFav;
174 }
175
163eae0b
NL
176 public function toggleStar()
177 {
178 $this->isFav = $this->getIsFav() ^ 1;
179
180 return $this;
181 }
182
9d50517c
NL
183 /**
184 * Set content
185 *
186 * @param string $content
187 * @return Entries
188 */
189 public function setContent($content)
190 {
191 $this->content = $content;
192
193 return $this;
194 }
195
196 /**
197 * Get content
198 *
199 * @return string
200 */
201 public function getContent()
202 {
203 return $this->content;
204 }
205
206 /**
207 * Set userId
208 *
209 * @param string $userId
210 * @return Entries
211 */
212 public function setUserId($userId)
213 {
214 $this->userId = $userId;
215
216 return $this;
217 }
218
219 /**
220 * Get userId
221 *
222 * @return string
223 */
224 public function getUserId()
225 {
226 return $this->userId;
227 }
228}