public function export() { $messages = array_map([$this, 'prepareMessage'], $this->messages); $body = implode("\n", $messages) . "\n"; $this->db->post([$this->index, $this->type, '_bulk'], $this->options, $body); }