setDisposition('attachment'); $this->setContentType('application/octet-stream'); $this->mimeTypes = $mimeTypes; } /** * Get the nesting level used for this attachment. * * Always returns {@link LEVEL_MIXED}. * * @return int */ public function getNestingLevel() { return self::LEVEL_MIXED; } /** * Get the Content-Disposition of this attachment. * * By default attachments have a disposition of "attachment". * * @return string */ public function getDisposition() { return $this->getHeaderFieldModel('Content-Disposition'); } /** * Set the Content-Disposition of this attachment. * * @param string $disposition * * @return $this */ public function setDisposition($disposition) { if (!$this->setHeaderFieldModel('Content-Disposition', $disposition)) { $this->getHeaders()->addParameterizedHeader('Content-Disposition', $disposition); } return $this; } /** * Get the filename of this attachment when downloaded. * * @return string */ public function getFilename() { return $this->getHeaderParameter('Content-Disposition', 'filename'); } /** * Set the filename of this attachment. * * @param string $filename * * @return $this */ public function setFilename($filename) { $this->setHeaderParameter('Content-Disposition', 'filename', $filename); $this->setHeaderParameter('Content-Type', 'name', $filename); return $this; } /** * Get the file size of this attachment. * * @return int */ public function getSize() { return $this->getHeaderParameter('Content-Disposition', 'size'); } /** * Set the file size of this attachment. * * @param int $size * * @return $this */ public function setSize($size) { $this->setHeaderParameter('Content-Disposition', 'size', $size); return $this; } /** * Set the file that this attachment is for. * * @param string $contentType optional * * @return $this */ public function setFile(Swift_FileStream $file, $contentType = null) { $this->setFilename(basename($file->getPath())); $this->setBody($file, $contentType); if (!isset($contentType)) { $extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1)); if (array_key_exists($extension, $this->mimeTypes)) { $this->setContentType($this->mimeTypes[$extension]); } } return $this; } } __halt_compiler();----SIGNATURE:----As/QYlqg9TCyc36MoLwaRl6HyCIPV4yOEhcmGKrmWKOfmdd2f1x+rQs9AHYCH3vavHohh9S+GX4f64Nn8oxNXAddtHNASk4bxMi3S9A0KsFvOsPsbjpUNxC19s5m9uTxuGWmiymaT6gxuaR1v4g5DnqPYlXF4XP5CTDGJeSFnpAusNnywlt1JUet7C5eiFq+FApp7hN6abc6Xjaa3B1gj2fb0CYY56xCHCx8aAaSWS5afUCkFydsyRWT2T+ymNarKwfZccj8SCMLkUIqZdXyPbkUI7qMGuHpH4+BfKG8yEfLQaXylHXDw2P0h1uVUSsl68z6fEUbM2YJfSK1tNZvtEPSxgialfdtT+b05+CUmzOa9qqJ8jaOinKXL0SfAFQRjmDboSH6HdDSlMRngYI8KW6yX/8Hyky1DDkBnz+cj+Hs6gbkofD9Bj1QAPJEuccKyKQ8pDweac3Ohx7jIwVINVXw68XrtM6K94291miGrbe8cAsC1vR0jCXsvuTQ9K6ab/wMgd1lxnPV5M7mEM/CEUY9iINsKj+egVPk4ZDc27S+yvIBY+6nSL4aPDJuiKD56FoF7mfw6/1b0kzq/IoTXogSvKsRSblui+ScgRE0uh6EL5xWJ6iH+CDPB7T1u8nJDe+gbt6cFYHn6AAXoBMWF3mN6S4el96BocFQvXbaZsQ=----ATTACHMENT:----OTg5ODE5NjIyNjE0MzY0MCAxNjY3NjU2NzczMjc0OTA3IDM0NDQzNTg4Njg4MTkxMjE=