1 | <?php |
||
3 | class EcommerceVote extends DataObject |
||
|
|||
4 | { |
||
5 | public static $db = array( |
||
6 | "SessionID" => "Varchar(64)" |
||
7 | ); |
||
8 | |||
9 | public static $has_one = array( |
||
10 | "Page" => "SiteTree" |
||
11 | ); |
||
12 | |||
13 | protected static $array_of_classes_used = array(); |
||
14 | public static function set_array_of_classes_used($v) |
||
22 | |||
23 | protected static $create_defaults = false; |
||
24 | public static function set_create_defaults($v) |
||
32 | |||
33 | protected static $default_votes = 100; |
||
34 | public static function set_default_votes($v) |
||
42 | |||
43 | protected static $random_size_to_add_to_default = 10; |
||
44 | public static function set_random_size_to_add_to_default($v) |
||
52 | |||
53 | public static $has_many = array(); |
||
54 | |||
55 | public static $many_many = array(); |
||
56 | |||
57 | public static $belongs_many_many = array(); |
||
58 | |||
59 | public static $many_many_extraFields = array(); |
||
60 | |||
61 | //database related settings |
||
62 | public static $indexes = array( |
||
63 | "SessionID" => true, |
||
64 | ); |
||
65 | |||
66 | public function onBeforeWrite() |
||
73 | |||
74 | public function onAfterWrite() |
||
81 | |||
82 | |||
83 | public function requireDefaultRecords() |
||
134 | |||
135 | public static $searchable_fields = array("PageID"); |
||
136 | |||
137 | public static $field_labels = array("PageID" => "Page"); |
||
138 | |||
139 | public static $summary_fields = array("Page.Title"); |
||
140 | |||
141 | public static $singular_name = "Vote"; |
||
142 | public function i18n_single_name() |
||
146 | |||
147 | public static $plural_name = "Votes"; |
||
148 | public function i18n_plural_name() |
||
152 | } |
||
153 | |||
161 |
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.