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