1 | <?php |
||
10 | class Comment extends ActiveRecordModel |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var string $tableName name of the database table. |
||
15 | */ |
||
16 | protected $tableName = "Comment"; |
||
17 | |||
18 | /** |
||
19 | * Columns in the table. |
||
20 | * |
||
21 | * @var integer $id primary key auto incremented. |
||
22 | */ |
||
23 | public $id; |
||
24 | public $user; |
||
25 | public $gravatar; |
||
26 | public $content; |
||
27 | |||
28 | /** |
||
29 | * Add a comment to the session. |
||
30 | * |
||
31 | * @param string $username |
||
32 | * @param string $comment |
||
33 | * @param string $gravatar |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | 1 | public function addComment($username, $comment, $gravatar) |
|
44 | |||
45 | /** |
||
46 | * Convert email to md5 string |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 1 | public function convertEmail($email) |
|
54 | |||
55 | /** |
||
56 | * Delete post |
||
57 | *@param int id |
||
58 | * |
||
59 | *@return void |
||
60 | */ |
||
61 | |||
62 | 1 | public function deletePost($id) |
|
66 | |||
67 | /** |
||
68 | * Update Comment |
||
69 | * |
||
70 | * @param int $id |
||
71 | * @param string $user |
||
72 | * @param string $content |
||
73 | * @param string $gravatar |
||
74 | * |
||
75 | * @return void |
||
76 | */ |
||
77 | 1 | public function updateComment($id, $user, $content, $gravatar) |
|
85 | } |
||
86 |