1 | <?php |
||
4 | class EmailReminder_DailyMailOut extends BuildTask implements EmailReminder_MailOutInterface |
||
|
|||
5 | { |
||
6 | |||
7 | |||
8 | /** |
||
9 | * @var int |
||
10 | */ |
||
11 | private static $limit = 20; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private static $replacer_class = 'EmailReminder_ReplacerClassBase'; |
||
17 | |||
18 | |||
19 | protected $verbose = false; |
||
20 | |||
21 | protected $testOnly = false; |
||
22 | |||
23 | /** |
||
24 | * The object that replaces tags in the subject and content. |
||
25 | * @var EmailReinder_ReplacerClassInterface |
||
26 | */ |
||
27 | protected $replacerObject = null; |
||
28 | |||
29 | |||
30 | public function setVerbose($b) |
||
34 | |||
35 | public function setTestOnly($b) |
||
39 | |||
40 | /** |
||
41 | * |
||
42 | * @todo: https://docs.silverstripe.org/en/3.1/developer_guides/extending/injector/ implement |
||
43 | * for email class to be used... |
||
44 | * |
||
45 | * expire date = 08-09 |
||
46 | * days before 7 |
||
47 | * min: current date + 7 - grace days |
||
48 | * min: current date + 7 |
||
49 | * |
||
50 | * expire date = 08-09 |
||
51 | * days after 7 |
||
52 | * min: current date - 7 |
||
53 | * max current date - 7 - grace days |
||
54 | * |
||
55 | * @param SS_Request $request |
||
56 | */ |
||
57 | public function run($request) |
||
62 | |||
63 | protected function startSending() |
||
69 | |||
70 | |||
71 | /** |
||
72 | * |
||
73 | * @param EmailReminder_NotificationSchedule $reminder |
||
74 | * @param string|DataObject $recordOrEmail |
||
75 | * @param bool $isTestOnly |
||
76 | */ |
||
77 | public function runOne($reminder, $recordOrEmail, $isTestOnly = false, $force = false) |
||
78 | { |
||
79 | $this->startSending(); |
||
80 | $this->sendEmail($reminder, $recordOrEmail, $isTestOnly, $force); |
||
81 | } |
||
82 | |||
83 | protected function runAll() |
||
114 | |||
115 | |||
116 | protected function sendEmail($reminder, $recordOrEmail, $isTestOnly, $force = false) |
||
182 | |||
183 | |||
184 | /** |
||
185 | * @return EmailReminder_ReplacerClassInterface | null |
||
186 | */ |
||
187 | public function getReplacerObject() |
||
200 | |||
201 | |||
202 | /** |
||
203 | * |
||
204 | * @return string |
||
205 | */ |
||
206 | public function getParsedContent($record, $content) |
||
215 | } |
||
216 |
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.