1 | <?php |
||
12 | class LangModule extends DataObject { |
||
|
|||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | * @config |
||
17 | */ |
||
18 | private static $db = [ |
||
19 | 'Name' => 'Varchar', |
||
20 | ]; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | * @config |
||
25 | */ |
||
26 | private static $has_many = [ |
||
27 | 'Entities' => 'LangEntity', |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * Find module by name or create a new one if not existing. |
||
32 | * |
||
33 | * @param string $name |
||
34 | * |
||
35 | * @return LangModule |
||
36 | */ |
||
37 | public static function findOrCreate($name) { |
||
49 | |||
50 | protected function onBeforeWrite() { |
||
55 | |||
56 | public static function getByName($name) { |
||
63 | |||
64 | public function mergeOrAddEntity($namespace, $value, $title = '', $merge = false) { |
||
102 | } |
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.