Better stylesheet ordering
[squirrelmail.git] / class / mime / MessageHeader.class.php
1 <?php
2
3 /**
4 * MessageHeader.class.php
5 *
6 * This file contains functions needed to handle headers in mime messages.
7 *
8 * @copyright &copy; 2003-2006 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id$
11 * @package squirrelmail
12 * @subpackage mime
13 * @since 1.3.2
14 */
15
16 /**
17 * Message header class
18 * Class contains all variables available in a bodystructure
19 * entity like described in rfc2060
20 * It was called msg_header in 1.3.0 and 1.3.1.
21 * @package squirrelmail
22 * @subpackage mime
23 * @since 1.3.2
24 */
25 class MessageHeader {
26 /**
27 * Media type
28 * @var string
29 */
30 var $type0 = '';
31 /**
32 * Media subtype
33 * @var string
34 */
35 var $type1 = '';
36 /**
37 * Content type parameters
38 * @var array
39 */
40 var $parameters = array();
41 /**
42 * @var mixed
43 */
44 var $id = 0;
45 /**
46 * @var string
47 */
48 var $description = '';
49 /**
50 * @var string
51 */
52 var $encoding='';
53 /**
54 * Message size
55 * @var integer
56 */
57 var $size = 0;
58 /**
59 * @var string
60 */
61 var $md5='';
62 /**
63 * @var mixed
64 */
65 var $disposition = '';
66 /**
67 * @var mixed
68 */
69 var $language='';
70
71 /**
72 * Sets header variable
73 * @param string $var
74 * @param mixed $value
75 */
76 function setVar($var, $value) {
77 $this->{$var} = $value;
78 }
79
80 /**
81 * Gets parameter value from $parameters array
82 * @param string $p
83 * @return mixed
84 */
85 function getParameter($p) {
86 $value = strtolower($p);
87 return (isset($this->parameters[$p]) ? $this->parameters[$p] : '');
88 }
89
90 /**
91 * Sets parameter value in $parameters array
92 * @param string $parameter
93 * @param mixed $value
94 */
95 function setParameter($parameter, $value) {
96 $this->parameters[strtolower($parameter)] = $value;
97 }
98 }