Total Complexity | 10 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class News { |
||
11 | private $id; |
||
12 | private $headline; |
||
13 | private $text; |
||
14 | private $date; |
||
15 | private $image; |
||
16 | private $image_id; |
||
17 | private $userid; |
||
|
|||
18 | |||
19 | public function __construct( |
||
20 | $id, |
||
21 | $headline, |
||
22 | $text, |
||
23 | $date, |
||
24 | $image, |
||
25 | $image_id, |
||
26 | $user |
||
27 | ) { |
||
28 | $this->id = $id; |
||
29 | $this->headline = $headline; |
||
30 | $this->text = $text; |
||
31 | $this->date = $date; |
||
32 | $this->user = $user; |
||
33 | $this->image_id = $image_id; |
||
34 | |||
35 | if ($image != null) { |
||
36 | $this->image = $GLOBALS['news_images_path'].$image; |
||
37 | } |
||
38 | } |
||
39 | |||
40 | public function getId() { |
||
41 | return $this->id; |
||
42 | } |
||
43 | |||
44 | public function getHeadline() { |
||
45 | return $this->headline; |
||
46 | } |
||
47 | |||
48 | public function getText() { |
||
49 | return $this->text; |
||
50 | } |
||
51 | |||
52 | public function getDate() { |
||
53 | return $this->date; |
||
54 | } |
||
55 | |||
56 | public function getImage() { |
||
57 | return $this->image; |
||
58 | } |
||
59 | |||
60 | public function getImageId() { |
||
61 | return $this->image_id; |
||
62 | } |
||
63 | |||
64 | public function getUser() { |
||
65 | return $this->user; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @return The HTML-ized version of the text (with the AL code |
||
70 | * rendered to HTML and smilies removed) |
||
71 | */ |
||
72 | public function getHtmlText() { |
||
74 | } |
||
75 | } |
||
76 |