Zend Framework - Zend_Mail | ||||||||||||||||||||
|
||||||||||||||||||||
1 : <?php 2 : /** 3 : * Zend Framework 4 : * 5 : * LICENSE 6 : * 7 : * This source file is subject to version 1.0 of the Zend Framework 8 : * license, that is bundled with this package in the file LICENSE, and 9 : * is available through the world-wide-web at the following URL: 10 : * http://www.zend.com/license/framework/1_0.txt. If you did not receive 11 : * a copy of the Zend Framework license and are unable to obtain it 12 : * through the world-wide-web, please send a note to license@zend.com 13 : * so we can mail you a copy immediately. 14 : * 15 : * @package Zend_Mail 16 : * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com) 17 : * @license http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0 18 : */ 19 : 20 : 21 : /** 22 : * Zend_Mime_Decode 23 : */ 24 : require_once 'Zend/Mime/Decode.php'; 25 : 26 : /** 27 : * Zend_Mail_Exception 28 : */ 29 : require_once 'Zend/Mail/Exception.php'; 30 : 31 : /** 32 : * Zend_Mail_Part 33 : */ 34 : require_once 'Zend/Mail/Part.php'; 35 : 36 : /** 37 : * @package Zend_Mail 38 : * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com) 39 : * @license http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0 40 : */ 41 : class Zend_Mail_Message extends Zend_Mail_Part 42 : { 43 : /** 44 : * Public constructor 45 : * 46 : * @param string $rawMessage full message with or without headers 47 : */ 48 : public function __construct(array $params) 49 : { 50 38 : if(isset($params['file'])) { 51 11 : if(!is_resource($params['file'])) { 52 10 : $params['raw'] = @file_get_contents($params['file']); 53 10 : if($params['raw'] === false) { 54 1 : throw new Zend_Mail_Exception('could not open file'); 55 : } 56 9 : } else { 57 1 : $params['raw'] = ''; 58 1 : while(!feof($params['file'])) { 59 1 : $params['raw'] .= fgets($params['file']); 60 1 : } 61 : } 62 10 : } 63 : 64 37 : parent::__construct($params); 65 35 : } 66 : 67 : public function getTopLines() 68 : { 69 0 : return $this->_topLines; 70 : } 71 : } 72 : |
Generated by: PHPUnit 3.0.0 and Xdebug 2.0.0RC2-dev. |