Aleksander Machniak
2012-11-17 9ab34604d94270f6c1795c7dd7b615273d05db0c
commit | author | age
0c2596 1 <?php
A 2
3 /*
4  +-----------------------------------------------------------------------+
5  | program/include/rcube_message_part.php                                |
6  |                                                                       |
7  | This file is part of the Roundcube Webmail client                     |
8  | Copyright (C) 2005-2012, The Roundcube Dev Team                       |
9  | Copyright (C) 2011-2012, Kolab Systems AG                             |
10  |                                                                       |
11  | Licensed under the GNU General Public License version 3 or            |
12  | any later version with exceptions for skins & plugins.                |
13  | See the README file for a full license statement.                     |
14  |                                                                       |
15  | PURPOSE:                                                              |
16  |   Class representing a message part                                   |
17  |                                                                       |
18  +-----------------------------------------------------------------------+
19  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
20  | Author: Aleksander Machniak <alec@alec.pl>                            |
21  +-----------------------------------------------------------------------+
22 */
23
24
25 /**
26  * Class representing a message part
27  *
9ab346 28  * @package    Framework
AM 29  * @subpackage Storage
0c2596 30  * @author     Thomas Bruederli <roundcube@gmail.com>
A 31  * @author     Aleksander Machniak <alec@alec.pl>
32  */
33 class rcube_message_part
34 {
35     /**
36      * Part MIME identifier
37      *
38      * @var string
39      */
40     public $mime_id = '';
41
42     /**
43      * Content main type
44      *
45      * @var string
46      */
47     public $ctype_primary = 'text';
48
49     /**
50      * Content subtype
51      *
52      * @var string
53      */
54     public $ctype_secondary = 'plain';
55
56     /**
57      * Complete content type
58      *
59      * @var string
60      */
61     public $mimetype = 'text/plain';
62
63     public $disposition = '';
64     public $filename = '';
65     public $encoding = '8bit';
66     public $charset = '';
67
68     /**
69      * Part size in bytes
70      *
71      * @var int
72      */
73     public $size = 0;
74
75     /**
76      * Part headers
77      *
78      * @var array
79      */
80     public $headers = array();
81
82     public $d_parameters = array();
83     public $ctype_parameters = array();
84
85
86     /**
87      * Clone handler.
88      */
89     function __clone()
90     {
91         if (isset($this->parts)) {
92             foreach ($this->parts as $idx => $part) {
93                 if (is_object($part)) {
94                     $this->parts[$idx] = clone $part;
95                 }
96             }
97         }
98     }
99
100 }