1 | <?php |
||
15 | class LangEntity extends DataObject { |
||
|
|||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | * @config |
||
20 | */ |
||
21 | private static $db = [ |
||
22 | 'Namespace' => 'Varchar(318)', |
||
23 | 'Value' => 'Varchar(318)', |
||
24 | 'Title' => 'Varchar(512)', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | * @config |
||
30 | */ |
||
31 | private static $translate = ['Value']; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | * @config |
||
36 | */ |
||
37 | private static $extensions = ['FluentExtension']; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | * @config |
||
42 | */ |
||
43 | private static $has_one = [ |
||
44 | 'Module' => 'LangModule', |
||
45 | ]; |
||
46 | |||
47 | /** |
||
48 | * @var array |
||
49 | * @config |
||
50 | */ |
||
51 | private static $create_table_options = [ |
||
52 | 'MySQLDatabase' => 'ENGINE=MyISAM', |
||
53 | ]; |
||
54 | |||
55 | /** |
||
56 | * @var array |
||
57 | * @config |
||
58 | */ |
||
59 | private static $indexes = [ |
||
60 | 'SearchFields' => [ |
||
61 | 'type' => 'fulltext', |
||
62 | 'name' => 'SearchFields', |
||
63 | 'value' => '"Namespace", "Value", "Title"', |
||
64 | ], |
||
65 | ]; |
||
66 | |||
67 | /** |
||
68 | * @param string $namespace |
||
69 | * |
||
70 | * @return LangEntity |
||
71 | */ |
||
72 | public static function getByNamespace($namespace) { |
||
75 | } |
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.