1 | <?php |
||
9 | class Comment { |
||
10 | private $required_connection; |
||
11 | private $check_comment; |
||
12 | private $table; |
||
13 | private $id_in_table; |
||
14 | |||
15 | |||
16 | |||
17 | //-------------------------- BUILDER ----------------------------------------------------------------------------// |
||
18 | public function __construct() { |
||
34 | //-------------------------- END BUILDER ----------------------------------------------------------------------------// |
||
35 | |||
36 | |||
37 | |||
38 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
||
39 | public function getRequiredConnection() { |
||
45 | |||
46 | /** |
||
47 | * @param $values |
||
48 | * @return string |
||
49 | * this function will get the view of list comments and form to write a comment |
||
50 | */ |
||
51 | private function getRender($values) { |
||
61 | |||
62 | /** |
||
63 | * @param $table |
||
64 | * @param $id_in_table |
||
65 | * function wich get all comments of an other module like a article of a blog |
||
66 | * after all coments was getted it will call getRender to use twig to render them |
||
67 | */ |
||
68 | public function getComments($table, $id_in_table) { |
||
91 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
||
92 | |||
93 | |||
94 | |||
95 | //-------------------------- SETTER ----------------------------------------------------------------------------// |
||
96 | /** |
||
97 | * @param $table |
||
98 | * @param $id_in_table |
||
99 | * @param $comment |
||
100 | * @param $pseudo |
||
101 | * @return bool |
||
102 | * function to add a comment if pseudo and comment != "" |
||
103 | */ |
||
104 | public function setComment($table, $id_in_table, $comment, $pseudo) { |
||
123 | //-------------------------- END SETTER ----------------------------------------------------------------------------// |
||
124 | |||
125 | } |