web/lib/Zend/Mime/Part.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    12  * obtain it through the world-wide-web, please send an email
    12  * obtain it through the world-wide-web, please send an email
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Mime
    16  * @package    Zend_Mime
    17  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @version    $Id: Part.php 20096 2010-01-06 02:05:09Z bkarwin $
    19  * @version    $Id: Part.php 24593 2012-01-05 20:35:02Z matthew $
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * Zend_Mime
    23  * Zend_Mime
    24  */
    24  */
    27 /**
    27 /**
    28  * Class representing a MIME part.
    28  * Class representing a MIME part.
    29  *
    29  *
    30  * @category   Zend
    30  * @category   Zend
    31  * @package    Zend_Mime
    31  * @package    Zend_Mime
    32  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    32  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    33  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    34  */
    34  */
    35 class Zend_Mime_Part {
    35 class Zend_Mime_Part {
    36 
    36 
    37     public $type = Zend_Mime::TYPE_OCTETSTREAM;
    37     public $type = Zend_Mime::TYPE_OCTETSTREAM;
   144             return stream_get_contents($this->getEncodedStream());
   144             return stream_get_contents($this->getEncodedStream());
   145         } else {
   145         } else {
   146             return Zend_Mime::encode($this->_content, $this->encoding, $EOL);
   146             return Zend_Mime::encode($this->_content, $this->encoding, $EOL);
   147         }
   147         }
   148     }
   148     }
       
   149     
       
   150     /**
       
   151      * Get the RAW unencoded content from this part
       
   152      * @return string
       
   153      */
       
   154     public function getRawContent()
       
   155     {
       
   156         if ($this->_isStream) {
       
   157             return stream_get_contents($this->_content);
       
   158         } else {
       
   159             return $this->_content;
       
   160         }
       
   161     }
   149 
   162 
   150     /**
   163     /**
   151      * Create and return the array of headers for this MIME part
   164      * Create and return the array of headers for this MIME part
   152      *
   165      *
   153      * @access public
   166      * @access public