1 | <?php |
||
11 | class Post |
||
12 | { |
||
13 | /** |
||
14 | * @ORM\Column(type="integer") |
||
15 | * @ORM\Id |
||
16 | * @ORM\GeneratedValue(strategy="AUTO") |
||
17 | */ |
||
18 | protected $id; |
||
19 | |||
20 | /** |
||
21 | * @ORM\Column(type="string", length=100) |
||
22 | */ |
||
23 | private $title; |
||
24 | |||
25 | |||
26 | /** |
||
27 | * @ORM\Column(type="text") |
||
28 | */ |
||
29 | private $intro; |
||
30 | |||
31 | /** |
||
32 | * @ORM\Column(type="text") |
||
33 | */ |
||
34 | private $content; |
||
35 | |||
36 | /** |
||
37 | * @ORM\Column(type="string", length=100) |
||
38 | */ |
||
39 | private $slug; |
||
40 | |||
41 | /** |
||
42 | * @var datetime $created |
||
43 | * |
||
44 | * @Gedmo\Timestampable(on="create") |
||
45 | * @ORM\Column(type="datetime") |
||
46 | */ |
||
47 | private $created; |
||
48 | |||
49 | /** |
||
50 | * @var datetime $updated |
||
51 | * |
||
52 | * @Gedmo\Timestampable(on="update") |
||
53 | * @ORM\Column(type="datetime") |
||
54 | */ |
||
55 | private $updated; |
||
56 | |||
57 | /** |
||
58 | * Get id |
||
59 | * |
||
60 | * @return integer |
||
61 | */ |
||
62 | public function getId() |
||
66 | |||
67 | /** |
||
68 | * Set title |
||
69 | * |
||
70 | * @param string $title |
||
71 | * @return Post |
||
72 | */ |
||
73 | public function setTitle($title) |
||
74 | { |
||
75 | $this->title = $title; |
||
76 | |||
77 | return $this; |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * Get title |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getTitle() |
||
86 | { |
||
87 | return $this->title; |
||
88 | } |
||
89 | |||
90 | /** |
||
91 | * Set intro |
||
92 | * |
||
93 | * @param string $intro |
||
94 | * @return Post |
||
95 | */ |
||
96 | public function setIntro($intro) |
||
102 | |||
103 | /** |
||
104 | * Get intro |
||
105 | * |
||
106 | * @return string |
||
107 | */ |
||
108 | public function getIntro() |
||
112 | |||
113 | /** |
||
114 | * Set content |
||
115 | * |
||
116 | * @param string $content |
||
117 | * @return Post |
||
118 | */ |
||
119 | public function setContent($content) |
||
125 | |||
126 | /** |
||
127 | * Get content |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getContent() |
||
135 | |||
136 | /** |
||
137 | * Set slug |
||
138 | * |
||
139 | * @param string $slug |
||
140 | * @return Post |
||
141 | */ |
||
142 | public function setSlug($slug) |
||
148 | |||
149 | /** |
||
150 | * Get slug |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getSlug() |
||
155 | { |
||
156 | return $this->slug; |
||
157 | } |
||
158 | |||
159 | public function getCreated() |
||
163 | |||
164 | public function getUpdated() |
||
168 | } |
||
169 |