1 | <?php |
||
7 | class AdminCategory { |
||
8 | |||
9 | |||
10 | //-------------------------- BUILDER ----------------------------------------------------------------------------// |
||
11 | public function __construct() { |
||
14 | //-------------------------- END BUILDER ----------------------------------------------------------------------------// |
||
15 | |||
16 | |||
17 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
||
18 | /** |
||
19 | * @param $name |
||
20 | * @return bool |
||
21 | * test if a category exist |
||
22 | */ |
||
23 | private function getTestCategoryExist($name) { |
||
37 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
||
38 | |||
39 | |||
40 | //-------------------------- SETTER ----------------------------------------------------------------------------// |
||
41 | /** |
||
42 | * @param $categories |
||
43 | * @param $id_article |
||
44 | * add list of categories to an article |
||
45 | */ |
||
46 | public function setCategoriesArticle($categories, $id_article) { |
||
58 | |||
59 | /** |
||
60 | * @param $categories |
||
61 | * @param $id_article |
||
62 | * function to update catgories, in first step delete all categories and reinsert it after |
||
63 | */ |
||
64 | public function setUpdateCategoriesArticle($categories, $id_article) { |
||
71 | //-------------------------- END SETTER ----------------------------------------------------------------------------// |
||
72 | } |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.