1 | <?php |
||
16 | class Commenting |
||
|
|||
17 | { |
||
18 | |||
19 | /** |
||
20 | * Adds commenting to a {@link DataObject} |
||
21 | * |
||
22 | * @deprecated since version 2.0 |
||
23 | * |
||
24 | * @param string classname to add commenting to |
||
25 | * @param array $settings Settings. See {@link self::$default_config} for |
||
26 | * available settings |
||
27 | * |
||
28 | * @throws InvalidArgumentException |
||
29 | */ |
||
30 | public static function add($class, $settings = false) |
||
44 | |||
45 | /** |
||
46 | * Removes commenting from a {@link DataObject}. Does not remove existing comments |
||
47 | * but does remove the extension. |
||
48 | * |
||
49 | * @deprecated since version 2.0 |
||
50 | * |
||
51 | * @param string $class Class to remove {@link CommentsExtension} from |
||
52 | */ |
||
53 | public static function remove($class) |
||
58 | |||
59 | /** |
||
60 | * Returns whether a given class name has commenting enabled |
||
61 | * |
||
62 | * @deprecated since version 2.0 |
||
63 | * |
||
64 | * @return bool |
||
65 | */ |
||
66 | public static function has_commenting($class) |
||
71 | |||
72 | /** |
||
73 | * Sets a value for a class of a given config setting. Passing 'all' as the class |
||
74 | * sets it for everything |
||
75 | * |
||
76 | * @deprecated since version 2.0 |
||
77 | * |
||
78 | * @param string $class Class to set the value on. Passing 'all' will set it to all |
||
79 | * active mappings |
||
80 | * @param string $key setting to change |
||
81 | * @param mixed $value value of the setting |
||
82 | */ |
||
83 | public static function set_config_value($class, $key, $value = false) |
||
91 | |||
92 | /** |
||
93 | * Returns a given config value for a commenting class |
||
94 | * |
||
95 | * @deprecated since version 2.0 |
||
96 | * |
||
97 | * @param string $class |
||
98 | * @param string $key config value to return |
||
99 | * |
||
100 | * @throws Exception |
||
101 | * @return mixed |
||
102 | */ |
||
103 | public static function get_config_value($class, $key) |
||
119 | |||
120 | /** |
||
121 | * Determines whether a config value on the commenting extension |
||
122 | * matches a given value. |
||
123 | * |
||
124 | * @deprecated since version 2.0 |
||
125 | * |
||
126 | * @param string $class |
||
127 | * @param string $key |
||
128 | * @param string $value Expected value |
||
129 | * @return boolean |
||
130 | */ |
||
131 | public static function config_value_equals($class, $key, $value) |
||
138 | |||
139 | /** |
||
140 | * Return whether a user can post on a given commenting instance |
||
141 | * |
||
142 | * @deprecated since version 2.0 |
||
143 | * |
||
144 | * @param string $class |
||
145 | * @return boolean true |
||
146 | */ |
||
147 | public static function can_member_post($class) |
||
162 | } |
||
163 |
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.