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