protected function createAttachmentViaData($data, $name) { return $this->getManager()->getDI()->get('\\Swift_Attachment', [$data, $name]); }