one more identity action to process
[squirrelmail.git] / class / mime / MessageHeader.class.php
CommitLineData
19d470aa 1<?php
2
3/**
4 * MessageHeader.class.php
5 *
6c84ba1e 6 * Copyright (c) 2003-2005 The SquirrelMail Project Team
19d470aa 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
0f459286 9 * This file contains functions needed to handle headers in mime messages.
19d470aa 10 *
883d9cd3 11 * @version $Id$
2b646597 12 * @package squirrelmail
0f459286 13 * @subpackage mime
14 * @since 1.3.2
19d470aa 15 */
16
2b646597 17/**
0f459286 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.
2b646597 22 * @package squirrelmail
0f459286 23 * @subpackage mime
24 * @since 1.3.2
2b646597 25 */
19d470aa 26class MessageHeader {
9ed80157 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='';
19d470aa 71
0f459286 72 /**
73 * Sets header variable
74 * @param string $var
75 * @param mixed $value
19d470aa 76 */
19d470aa 77 function setVar($var, $value) {
78 $this->{$var} = $value;
79 }
80
0f459286 81 /**
82 * Gets parameter value from $parameters array
83 * @param string $p
84 * @return mixed
85 */
19d470aa 86 function getParameter($p) {
87 $value = strtolower($p);
88 return (isset($this->parameters[$p]) ? $this->parameters[$p] : '');
89 }
90
0f459286 91 /**
92 * Sets parameter value in $parameters array
93 * @param string $parameter
94 * @param mixed $value
95 */
19d470aa 96 function setParameter($parameter, $value) {
97 $this->parameters[strtolower($parameter)] = $value;
98 }
99}
100
ce68b76b 101?>