/** * Creates a new Attachment with $headers and $encoder. * @param Swift_Mime_HeaderSet $headers * @param Swift_Mime_ContentEncoder $encoder * @param Swift_KeyCache $cache * @param array $mimeTypes optional */ public function __construct(Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, $mimeTypes = array()) { parent::__construct($headers, $encoder, $cache, $mimeTypes); $this->setDisposition('inline'); $this->setId($this->getId()); }
/** * register the new file name * * @param string $newName * @return $this */ public function name($newName = '') { $this->attach->setFilename($newName); return $this; }