From 135b921db75da5995eab7e36393ecd4d2b0bc66f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 4 Nov 2014 21:33:05 -0500 Subject: Switch to composer --- .../classes/Swift/Mime/SimpleHeaderFactory.php | 188 --------------------- 1 file changed, 188 deletions(-) delete mode 100644 vendor/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php (limited to 'vendor/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php') diff --git a/vendor/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php b/vendor/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php deleted file mode 100644 index fe397fd0..00000000 --- a/vendor/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php +++ /dev/null @@ -1,188 +0,0 @@ -_encoder = $encoder; - $this->_paramEncoder = $paramEncoder; - $this->_grammar = $grammar; - $this->_charset = $charset; - } - - /** - * Create a new Mailbox Header with a list of $addresses. - * - * @param string $name - * @param array|string|null $addresses - * - * @return Swift_Mime_Header - */ - public function createMailboxHeader($name, $addresses = null) - { - $header = new Swift_Mime_Headers_MailboxHeader($name, $this->_encoder, $this->_grammar); - if (isset($addresses)) { - $header->setFieldBodyModel($addresses); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new Date header using $timestamp (UNIX time). - * @param string $name - * @param int|null $timestamp - * - * @return Swift_Mime_Header - */ - public function createDateHeader($name, $timestamp = null) - { - $header = new Swift_Mime_Headers_DateHeader($name, $this->_grammar); - if (isset($timestamp)) { - $header->setFieldBodyModel($timestamp); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new basic text header with $name and $value. - * - * @param string $name - * @param string $value - * - * @return Swift_Mime_Header - */ - public function createTextHeader($name, $value = null) - { - $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->_encoder, $this->_grammar); - if (isset($value)) { - $header->setFieldBodyModel($value); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new ParameterizedHeader with $name, $value and $params. - * - * @param string $name - * @param string $value - * @param array $params - * - * @return Swift_Mime_ParameterizedHeader - */ - public function createParameterizedHeader($name, $value = null, - $params = array()) - { - $header = new Swift_Mime_Headers_ParameterizedHeader($name, - $this->_encoder, (strtolower($name) == 'content-disposition') - ? $this->_paramEncoder - : null, - $this->_grammar - ); - if (isset($value)) { - $header->setFieldBodyModel($value); - } - foreach ($params as $k => $v) { - $header->setParameter($k, $v); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new ID header for Message-ID or Content-ID. - * - * @param string $name - * @param string|array $ids - * - * @return Swift_Mime_Header - */ - public function createIdHeader($name, $ids = null) - { - $header = new Swift_Mime_Headers_IdentificationHeader($name, $this->_grammar); - if (isset($ids)) { - $header->setFieldBodyModel($ids); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new Path header with an address (path) in it. - * - * @param string $name - * @param string $path - * - * @return Swift_Mime_Header - */ - public function createPathHeader($name, $path = null) - { - $header = new Swift_Mime_Headers_PathHeader($name, $this->_grammar); - if (isset($path)) { - $header->setFieldBodyModel($path); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Notify this observer that the entity's charset has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_charset = $charset; - $this->_encoder->charsetChanged($charset); - $this->_paramEncoder->charsetChanged($charset); - } - - /** Apply the charset to the Header */ - private function _setHeaderCharset(Swift_Mime_Header $header) - { - if (isset($this->_charset)) { - $header->setCharset($this->_charset); - } - } -} -- cgit v1.2.3