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 | private function getSuccessMessagePublish() { |
||
54 | |||
55 | /** |
||
56 | * @param $values |
||
57 | * @return string |
||
58 | * this function will get the view of list comments and form to write a comment |
||
59 | */ |
||
60 | private function getRender($values) { |
||
70 | |||
71 | /** |
||
72 | * @param $table |
||
73 | * @param $id_in_table |
||
74 | * function wich get all comments of an other module like a article of a blog |
||
75 | * after all coments was getted it will call getRender to use twig to render them |
||
76 | */ |
||
77 | public function getComments($table, $id_in_table) { |
||
100 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
||
101 | |||
102 | |||
103 | |||
104 | //-------------------------- SETTER ----------------------------------------------------------------------------// |
||
105 | /** |
||
106 | * @param $table |
||
107 | * @param $id_in_table |
||
108 | * @param $comment |
||
109 | * @param $pseudo |
||
110 | * @return bool |
||
111 | * function to add a comment if pseudo and comment != "" |
||
112 | */ |
||
113 | public function setComment($table, $id_in_table, $comment, $pseudo) { |
||
132 | //-------------------------- END SETTER ----------------------------------------------------------------------------// |
||
133 | |||
134 | } |