1<?php 2 3namespace go\core\mail; 4 5use go\core\fs\Blob; 6use Swift_Attachment; 7 8class Attachment extends Swift_Attachment { 9 10 /** 11 * Provide Blob. Extracts path from blob and returns attachment 12 * 13 * @param Blob $blob 14 * @return Swift_Attachment 15 */ 16 public static function fromBlob(Blob $blob) { 17 return Swift_Attachment::fromPath($blob->path()); 18 } 19 20}