swift = $swift; $this->timeline = new Timeline; } // Listen to the email events public function listenToEvents() { $this->swift->registerPlugin(new SwiftPluginClockworkTimeline($this->timeline)); } // Adds send emails to the request public function resolve(Request $request) { $request->emailsData = array_merge($request->emailsData, $this->timeline->finalize()); return $request; } // Reset the data source to an empty state, clearing any collected data public function reset() { $this->timeline = new Timeline; } }