1 | <?php namespace Xoopsmodules\newbb; |
||
8 | class Utility |
||
9 | { |
||
10 | /** |
||
11 | * Verify that a mysql table exists |
||
12 | * |
||
13 | * @package News |
||
14 | * @author Hervé Thouzard (http://www.herve-thouzard.com) |
||
15 | * @copyright (c) Hervé Thouzard |
||
16 | * @param $tablename |
||
17 | * @return bool |
||
18 | */ |
||
19 | public function tableExists($tablename) |
||
27 | |||
28 | /** |
||
29 | * Verify that a field exists inside a mysql table |
||
30 | * |
||
31 | * @package News |
||
32 | * @author Hervé Thouzard (http://www.herve-thouzard.com) |
||
33 | * @copyright (c) Hervé Thouzard |
||
34 | * @param $fieldname |
||
35 | * @param $table |
||
36 | * @return bool |
||
37 | */ |
||
38 | public function fieldExists($fieldname, $table) |
||
45 | |||
46 | /** |
||
47 | * Add a field to a mysql table |
||
48 | * |
||
49 | * @package News |
||
50 | * @author Hervé Thouzard (http://www.herve-thouzard.com) |
||
51 | * @copyright (c) Hervé Thouzard |
||
52 | * @param $field |
||
53 | * @param $table |
||
54 | * @return bool|\mysqli_result |
||
55 | */ |
||
56 | public function addField($field, $table) |
||
63 | |||
64 | /** |
||
65 | * Function responsible for checking if a directory exists, we can also write in and create an index.html file |
||
66 | * |
||
67 | * @param string $folder Le chemin complet du répertoire à vérifier |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | public static function prepareFolder($folder) |
||
83 | |||
84 | public static function cleanCache() |
||
100 | |||
101 | /** |
||
102 | * Checks if a user is admin of NewBB |
||
103 | * |
||
104 | * @return boolean |
||
105 | */ |
||
106 | public static function userIsAdmin() |
||
124 | } |
||
125 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.