1 | <?php |
||
6 | class NewbbUtility |
||
|
|||
7 | { |
||
8 | /** |
||
9 | * Verify that a mysql table exists |
||
10 | * |
||
11 | * @package News |
||
12 | * @author Hervé Thouzard (http://www.herve-thouzard.com) |
||
13 | * @copyright (c) Hervé Thouzard |
||
14 | * @param $tablename |
||
15 | * @return bool |
||
16 | */ |
||
17 | public function tableExists($tablename) |
||
25 | |||
26 | /** |
||
27 | * Verify that a field exists inside a mysql table |
||
28 | * |
||
29 | * @package News |
||
30 | * @author Hervé Thouzard (http://www.herve-thouzard.com) |
||
31 | * @copyright (c) Hervé Thouzard |
||
32 | * @param $fieldname |
||
33 | * @param $table |
||
34 | * @return bool |
||
35 | */ |
||
36 | public function fieldExists($fieldname, $table) |
||
43 | |||
44 | /** |
||
45 | * Add a field to a mysql table |
||
46 | * |
||
47 | * @package News |
||
48 | * @author Hervé Thouzard (http://www.herve-thouzard.com) |
||
49 | * @copyright (c) Hervé Thouzard |
||
50 | * @param $field |
||
51 | * @param $table |
||
52 | * @return bool|\mysqli_result |
||
53 | */ |
||
54 | public function addField($field, $table) |
||
61 | |||
62 | /** |
||
63 | * Function responsible for checking if a directory exists, we can also write in and create an index.html file |
||
64 | * |
||
65 | * @param string $folder Le chemin complet du répertoire à vérifier |
||
66 | * |
||
67 | * @return void |
||
68 | */ |
||
69 | public static function prepareFolder($folder) |
||
81 | |||
82 | public static function cleanCache() |
||
98 | |||
99 | /** |
||
100 | * Checks if a user is admin of NewBB |
||
101 | * |
||
102 | * @return boolean |
||
103 | */ |
||
104 | public static function userIsAdmin() |
||
122 | } |
||
123 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.